Multiple text cells in formula

Oberst Hajj

New Member
Joined
Sep 19, 2011
Messages
9
Hello everyone,

I need to write a formula that will look at the text in cell B14, if it is "Bomber" assign the value of cell C3, if it is "Recon" assign the value of C4, and if it is "Scout" assign the value of C5.

I have to do this for several cells and reference cells, but I think I can figure out how to string them together if I have that first part.

Thanks for any help you can give.

Keith
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Thanks anandvarma,

I actually came up with this
Code:
=IF(B14="Bomber",$C$3,IF(B14="Recon",$C$4,$C$5))
And that works for me. I now need to do a similar formula, referencing values of other cells based on text, but after all the IF conditions are checked and it assigns the value, I need to multiply the value by .6. Would I simply add

Code:
)*.6
At the end of it (with a corresponding opening parentheses just after the IF part of the formula)?
 
Upvote 0
Hi
a couple of options
Code:
=IF(B14="Bomber",$C$3*.6,IF(B14="Recon",$C$4*.6,$C$5*.6))
OR using a cell reference,$D$1, for instance, so that it's dynamic
Code:
=IF(B14="Bomber",$C$3*$D$1,IF(B14="Recon",$C$4*$D$1,$C$5*$D$1))
 
Upvote 0
this also works
Code:
=(IF(B14="Bomber",$C$3,IF(B14="Recon",$C$4,$C$5))*0.6)
 
Upvote 0
That's much cleaner and only has one place to edit if you need to change the .6 to something else.

Unrelated, but I'm talking with someone else from NSW on another forum right now. The internet has made the world a small place!
 
Upvote 0
Yep, it has made communications easier.....and sometimes faster !!
 
Upvote 0
Since they all start with a different letter, this may also work for you?

=INDEX($C$3:$C$5,SEARCH(LEFT(B14),"BRS"))*0.6

Not sure if B14 can ever take some other value (or be empty) so just note that as they stand the suggested formulas would return different (and probably unwanted) results in that circumstance. If this could be a posibility, please provide more details.
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,831
Members
452,946
Latest member
JoseDavid

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top