Excel – Data Manipulation (part 2)

Continuing  our data manipulation, these further examples can be applied to a cell to extract all kinds of data, and when used together can be particularly powerful when combined with the FIND command.  Part 3 (it could even be Part 4) will cover this and more! 🙂

 

An error is returned on a formula that is using a number extracted from a formula in Excel, why?

=VALUE(text)

When manipulating text using the aforementioned formula, it is common to extract numbers from an alphanumeric cell via manipulation or formula, often with the alphanumeric attribute still intact.  The use of VALUE  then forces any cell referenced to be treated as a number, where as formating the cell will not.

An example is where a formula displays a result and is then referenced by another formula. Second formula may error unless the preceding result is reference through the value statement.

 

How do I change case from lower to upper case in Excel?

=UPPER(text)

Turns selected text into Upper case.

Example:

upper

A2 contains the example formula; it references A1 as its source. Notice the resulting output is in all upper case.

 

How do I change case from upper to lower case in Excel?

=LOWER(text)

Turns selected text into Lower case.

Example:

lower

A2 contains the example formula; it references A1 as its source. Notice the resulting output is in all lower case.

 

How do I combine the contents of multiple cells to make a sentance?

=CONCATENATE(text, text, text…) or the continued use of ‘&’

(Where “text” = cell reference)

Can be used to combine multiple cells of data to form a text string

Example:

conc1

A2 contains the example formula; it references A1, B1, C1 and D1 as its source. To add spaces in this illustration I have added a space character between quotation marks (“ “).

Or:

conc2

Again A2 contains the example formula; it references A1, B1, C1 and D1 as its source. Removing “concatenate” you can combine strings with the example above using & instead.

I will leave you to judge which is your preferred, neater solution.

 

Share This:

Run any application as a service (using SrvStart)

Every so often I have come across circumastances where I have had to run a windows application as a service.  Some of these applications can be run quite happily and have been designed so, and using SC CREATE from the command prompt is usually adequate.

What if that doesn’t work?  Well, I have found a useful little dibber called SrvStart that enables you to run any application as a service, and here follows short concise guide how to (i’ll also assume you have some tech knowledge on how services work) !

Basically there are three steps after downloading SrvStart from the authors (Nick Rozanski) website, and I will take you through just enough to get you started!

First, copy the contents of the zip file to anywhere in your windows machines Path (for example c:\windows).

Secondly, create an ini file for SvcStart to read, this tells SvcStart what application you wish to run, an example can be found below, again copy this into you Path area.

svrstart

Finally, the third step, run a service as you would normally with SC CREATE from an administrator CMD prompt:

SC CREATE MonitorCTRLSVC DisplayName= “MonitorCTRLSVC” binPath= “srvstart.exe MonitorCTLSVC -c c:\windows\MonitorCTRLSVC.ini” start= auto

If successful, this should have created your windows service!

You can the check functionality via task managers services tab, and if you need to make any further configuration changes use the services console from there

To get this particular application to run as a service I had to create a service account so it could interact with the desktop (it’s a monitor control piece of software by a company called Tecton).

There you have it, three easy steps to get anything running as a service!

UPDATE:

As a member of my team spent some time following a documented set of instructions there is something worth noting….

Whilst 99.99% of windows applications are not case sensitive, it would appear svrstart.exe is.  Please take particular care with the .ini file.  The “startup”, “shutdown” variables are case sensitive and should be written as such in your .ini file 🙂

During this fault finding I found you can also use svrstart to install the service, so the cmd line becomes a little simpler, from the above it would become:

srvstart install MonitorCTRLSVC –c “c:\windows\MonitorCTRLSVC.ini”

Either way the result is exactly the same 🙂

Share This: