Need Formula Help....

  • Thread starter Thread starter pinger
  • Start date Start date
P

pinger

Hi:

Is there a formula string for something like this.....?: I want a number
in a cell when a specific word is typed in another cell, for example, if I
wanted the number 50 to appear in C2 if I type the word, say, Airplane, in
cell C1? Thanks, pinger
 
You need to define what you want when cell C1 does not contain the word
airplane.

Enter this formula in C2:

=IF(C1="airplane",50,"")

If C1 does not contain airplane the formula will leave the cell blank.
 
Thanks for the reply...let me be more specific. Suppose I have columns A
and B. I Type words in A and need a specific number to show up in the same
row in B. For example, whenever I type "airplane" in column A, I need "50"
to appear in B on the same row; whenever I type "Bus" in A, I need "55" to
appear; whenever I type "Train" in A, I need "60" to appear in B.....always
on the same row. Doable?
Thanks, pinger
 
"airplane" in column A, I need "50"
"Bus" in A, I need "55"
"Train" in A, I need "60"

That's 3 conditions. *Exactly* how many conditions do you have? The number
of conditions will determine what the best solution is.
 
pinger said:
Thanks for the reply...let me be more specific. Suppose I have columns A
and B. I Type words in A and need a specific number to show up in the
same row in B. For example, whenever I type "airplane" in column A, I
need "50" to appear in B on the same row; whenever I type "Bus" in A, I
need "55" to appear; whenever I type "Train" in A, I need "60" to appear
in B.....always on the same row. Doable?
Thanks, pinger

=SUM(IF(A1={"Airplane","Bus","Train"},{50,55,60}))

Bruno
 
Biff:

Thank you for your reply. I don't think what I'm trying to do is possible
in Excel, but let me tell you what I'm attempting:
I am trying to set up a spread sheet where my heath class students can
record the foods they eat on a daily basis and have the caloric value of the
foods show up in an adjacent cell whenever they type the name of a food in a
predetermined column. I would need to assign caloric values to each food ( I
suspect there would be between one and two hundred different items) ahead of
time. For example, Apple=85, Slice of Bread=100, Banana=90, etc. etc. So
if "Banana" was typed in A1, the number 90 would populate B1. I would then
roll up the numbers by day, week, etc. (which I know how to do) I'm simply
trying to do this so the Food and the Caloric value do not need to BOTH be
entered...to avoid errors thus making our project less valid.

Thanks, pinger
 
Hi

Set up all of your Foods on Sheet2 in column A, with their Calorific value
alongside in Column B
On Sheet1 in cell B1
=IF(A1="","",VLOOKUP(A1,Sheet2!$A:$B,2,0))
Copy down Sheet1 column B as far as required
 
Roger:

Perfect, Thank you very much! Also thanks to Biff, Bruno and Stew.

pinger
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
 
Back
Top