Mid Statements

K

kgiddens

I have a spreadsheet that has names of computers, some of the names are for
laptops, and some are for desktops. The laptop computers can be identified
by the letter "L" in the computer name. I am trying to write a mid statement
that will filter out all the laptops, so I can put them on a seperate
spreadsheet. I cannot remember how to do a mid statement to look at the end
of the name of the computer, count in 3 places and identify if there is an L
there or not.

HELP!
 
T

TWhizTom

Mid(stringtosearch,startpostion,numcharstolook)

If you computer names always have the L in the 8th position, name is in cell
A1 and your only looking for an L...

If(mid(A1,3,1)="L","Laptop","Desktop")
 
R

Rick Rothstein \(MVP - VB\)

This will return the 3rd letter from the end of the text in A1...

=MID(A1,LEN(A1)-2,1)

The generic form of this formula (so you can see where the 2 came from) is
this...

=MID(A1,LEN(A1)-<<LetterPosition>>+1,1)

where you would put 3 in for <<LetterPosition>> as per your posting.

Rick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top