IF command for multiple text options

kiwi44

New Member
Joined
Jul 12, 2016
Messages
7
Hi everyone,

I am trying to set up a formula for the following type of scenario:

Column A ---> Column B:
Apple ---> Fruit
Kale ---> Vegetable
Banana ---> Fruit
Carrot ---> Vegetable
Kale ---> Vegetable

What formula can I put in Column B in order to make sure that all Apples and Bananas (from column A) are listed as Fruit, and all Kale and Carrots are listed as Vegetables

Thanks in advance for the help!
 
Either use a VLookup into another sheet (recommended) or a long nested IF(OR()) statement.

Thanks! I'm not too skilled with excel, so I looked up VLookup. That seems to be for if Column B is already filled out. I'm trying to find an easy way to fill Column B with "Fruit" and "Vegetable" designations based on Column A.

Would the IF(OR()) statement work in this case?
 
Upvote 0
You need to build a lookup table that tells excel which values are fruits and which are vegetables.

Something like this, lookup table in E1:F4


Unknown
ABCDEF
1AppleFruitAppleFruit
2KaleVegetableKaleVegetable
3BananaFruitBananaFruit
4CarrotVegetableCarrotVegetable
5KaleVegetable
Sheet1
Cell Formulas
RangeFormula
B1=VLOOKUP(A1,$E$1:$F$4,2,0)
B2=VLOOKUP(A2,$E$1:$F$4,2,0)
B3=VLOOKUP(A3,$E$1:$F$4,2,0)
B4=VLOOKUP(A4,$E$1:$F$4,2,0)
B5=VLOOKUP(A5,$E$1:$F$4,2,0)
 
Upvote 0

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