LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 427
Default Searching for case specific data

More info: I searched Royal Mail's website for information about the
post code, and learned its format is 2 or 3 or 4 alphanumeric
characters, a space, and 3 alphanumeric characters. Then I searched a
list of counties in England, Scotland, and Wales for a " " (space) in
column n-4 (n minus 4) of each county name where n is the length of
the name: there are no counties in the list like that. So in your
example data we can search column F, which contains either the post
code or the county, for a space in column n-4.

I added two columns, H and I, to contain the county and postcode. I
used this formula in H:
=IF(MID(RIGHT(F2,4),1,1)=" ","",F2)
....and this in column I:
=IF(MID(RIGHT(F2,4),1,1)=" ",F2,G2)

The formula in H reviews the entry in column F to see if the text
string contains a space in column n-4. If it does, column H is blank;
if it does not, the formula pulls the county name from F. The formula
in I acts similarly: if F contains a space in column n-4, the formula
pulls the postcode from F; if the space is not in n-4, the formula
pulls the postcode from column G.

Does this work for the rest of your data?

Dave O



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
do formulas have to be case sensative when searching words elaine Excel Discussion (Misc queries) 2 July 17th 07 10:18 AM
Searching two columns against a specific criteria Colin Excel Worksheet Functions 2 July 10th 07 07:20 PM
Searching for the presence of specific words Ryan Ferrell Excel Worksheet Functions 1 December 25th 05 10:34 PM
searching for specific text clerk Excel Discussion (Misc queries) 1 December 7th 05 12:16 AM
searching for specific criteria and then doing an action based on Bill Excel Discussion (Misc queries) 1 July 20th 05 03:55 AM


All times are GMT +1. The time now is 12:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"