simple formula

T

taxmom

Hi,

I need a simple formula in column b, that says; look at column A if a2=
"city" look down column for "county" and return info in cell, if not "city"
leave blank. I do not want to put in specific city names. I just need to
get the county info next to the city info.

Can excel look up only part of a word?

simple version
A B C D
city totals---- prattville alabama gross amount
County Total ---Autauga alabama gross amount
city totals --- fairhope alabama gross amount
City totals --- foley alabama gross amount
city totals----gulf shores alabama gross amount
County Total----Baldwin

need to see
City totals ---prattville autauga
County Total---Autauga
Cit totals---fairhope baldwin
city totals---foley baldwin
city totals---gulfshores baldwin
county total ---baldwin

Can you Help?
 
G

Gazeta

U¿ytkownik "taxmom said:
Hi,

I need a simple formula in column b, that says; look at column A if a2=
"city" look down column for "county" and return info in cell, if not "city"
leave blank. I do not want to put in specific city names. I just need to
get the county info next to the city info.

Can excel look up only part of a word?

simple version
A B C D
city totals---- prattville alabama gross amount
County Total ---Autauga alabama gross amount
city totals --- fairhope alabama gross amount
City totals --- foley alabama gross amount
city totals----gulf shores alabama gross amount
County Total----Baldwin

need to see
City totals ---prattville autauga
County Total---Autauga
Cit totals---fairhope baldwin
city totals---foley baldwin
city totals---gulfshores baldwin
county total ---baldwin

Can you Help?

try in b1
=if(find("City";A1;1);right(A2;len(A2)-find("---";A2;1)-2);"")

mcg
 
T

taxmom

Thank you, However, I'm not doing something right. A message comes up
stating that there is an error in the formula. Should I be replacing the ---
with something?
or do I use the formula exactly as you provided?
 
G

Gord Dibben

You might try changing the semi-colons to commas.

The semi-colons are a European format.


Gord Dibben MS Excel MVP
 

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

Similar Threads

array formula 1
Index/Match Functions to Return Concatenated Response 4
EXCEL FORMULA 6
VLOOKUP 0
Sum? IF? function 3
sumproduct question 3
What Functions should be used 4
Report Formula 0

Top