IF STATEMENTS NOT WORKING

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following


FEDERAL FARM CR this is what I need FEDERAL FARM CREDIT BANK
FEDERAL HOME BKS this is what I need FEDERAL HOME LOAN BANK
FEDERAL NATL MTG this is what I need FEDERAL NATIONAL MORTGAGE CORP

=IF(A2="*FARM*","FEDERAL FARM CREDIT BANK",IF(A2="*HOME*","FEDERAL HOME LOAN
BANK",IF(A2,"*NATL*","FEDERAL NATIONAL MORTGAGE CORPORATION","")))

Can you please advise why a following formula doesn't work and how can I
correct it.

Thank you
 
That goes something like this:

=IF(ISNUMBER(SEARCH("FARM",A2)),"FEDERAL
FARM",IF(ISNUMBER(SEARCH("HOME",A2)),"FEDERAL
HOME",IF(ISNUMBER(SEARCH("NATL",A2)),"FEDERAL NATL","")))

Thanks again
 
Another way:

Create a 2 column table like this:

...........I..........J..........
1....Farm......FEDERAL FARM CREDIT BANK
2....Home....FEDERAL HOME LOAN BANK
3....Natl.......FEDERAL NATIONAL MORTGAGE CORP

Then use this formula:

=LOOKUP(2,1/(ISNUMBER(SEARCH(I$1:I$3,A1))),J$1:J$3)
 
Thank you,


T. Valko said:
Another way:

Create a 2 column table like this:

...........I..........J..........
1....Farm......FEDERAL FARM CREDIT BANK
2....Home....FEDERAL HOME LOAN BANK
3....Natl.......FEDERAL NATIONAL MORTGAGE CORP

Then use this formula:

=LOOKUP(2,1/(ISNUMBER(SEARCH(I$1:I$3,A1))),J$1:J$3)
 

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

Back
Top