If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Access equiv. of Excels =Search("_",A1)
When reducing UK Postcodes from unit postcode MK19_1PY to Postcode Sector
MK19_1 I used to use =Search("_",A1) to identify the position of the blank in the text string. In the MK19_1PY example, the result would be character number 5 in Cell B1. I would then use =Left(A1,B1+1) to provide me with the shortened Post Code sector. UK postcode blanks are not in a uniform position eg WN1R_2XN, so it is necessary to identify position of blank. How do I write the above to functions when using Access Expression builder? D |
#2
|
|||
|
|||
InStr is the equivalent of Search.
You should be able to do it all in one statement: Left([PostCode], InStr([PostCode], " ") + 1) -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Duncan" wrote in message ... When reducing UK Postcodes from unit postcode MK19_1PY to Postcode Sector MK19_1 I used to use =Search("_",A1) to identify the position of the blank in the text string. In the MK19_1PY example, the result would be character number 5 in Cell B1. I would then use =Left(A1,B1+1) to provide me with the shortened Post Code sector. UK postcode blanks are not in a uniform position eg WN1R_2XN, so it is necessary to identify position of blank. How do I write the above to functions when using Access Expression builder? D |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Conversion Problems | Katherine R | New Users | 11 | December 19th, 2004 12:38 AM |
Access XP Compared to Access 2003 | Mardene Leahu | New Users | 1 | October 1st, 2004 05:11 AM |
What is MDE | Charlie | General Discussion | 4 | August 24th, 2004 04:15 PM |
Data from Excel to Access | Database Design | 2 | August 20th, 2004 12:53 PM | |
Useless Access 2003 | tired, angry, sucidial and bored | General Discussion | 10 | July 21st, 2004 11:52 PM |