Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Tobias
 
Posts: n/a
Default wildcard use in formulas

I am using Excell 2003

I'm trying to set up an "IF" formula in one cell to to assign office
location to postcode located in another cell. for example
=IF(A1="BD*","Bradford","Leeds"
Where the * is a wildcard. The formula doesn't allow this however, as it
looks at only what is typed into the A1 cell. For a Bradford return I have
had to type BD* in A1. My aim is for an automatic listing of the appropriate
office once the post code is typed into the preceding cell. I may be going
about this the wrong way.

I would be grateful of any help
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

=IF(LEFT(A1,2)="BD","Bradford","Leeds")

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Tobias" wrote in message
...
I am using Excell 2003

I'm trying to set up an "IF" formula in one cell to to assign office
location to postcode located in another cell. for example
=IF(A1="BD*","Bradford","Leeds"
Where the * is a wildcard. The formula doesn't allow this however, as it
looks at only what is typed into the A1 cell. For a Bradford return I have
had to type BD* in A1. My aim is for an automatic listing of the

appropriate
office once the post code is typed into the preceding cell. I may be going
about this the wrong way.

I would be grateful of any help



  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default

I'd use Bob's formula, too, but one way using the wildcard:

=IF(COUNTIF(A1,"BD*")0,"Bradford","Leeds")

==
But if you have lots of these postal codes, I'd create a table on another sheet.

A B
BD Bradford
LD Leads
xx whatever
....

=vlookup(left(a1,2),sheet2!a:b,2,false)




Tobias wrote:

I am using Excell 2003

I'm trying to set up an "IF" formula in one cell to to assign office
location to postcode located in another cell. for example
=IF(A1="BD*","Bradford","Leeds"
Where the * is a wildcard. The formula doesn't allow this however, as it
looks at only what is typed into the A1 cell. For a Bradford return I have
had to type BD* in A1. My aim is for an automatic listing of the appropriate
office once the post code is typed into the preceding cell. I may be going
about this the wrong way.

I would be grateful of any help


--

Dave Peterson
Reply
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
Array Formulas take waaaay too long... belly0fdesire Excel Worksheet Functions 7 August 8th 05 10:11 PM
Need Formulas for counting multiple conditions OrdOff Excel Worksheet Functions 4 July 3rd 05 06:12 PM
Problem with named formula's nathan Excel Worksheet Functions 0 January 21st 05 04:07 PM
How to make Excel run limited number of formulas on a given worksh John Excel Discussion (Misc queries) 0 January 12th 05 04:29 PM
calculating formulas for all workbooks in a folder Chad Excel Worksheet Functions 3 November 13th 04 05:22 PM


All times are GMT +1. The time now is 11:05 AM.

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

About Us

"It's about Microsoft Excel"