ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Function needed please (https://www.excelbanter.com/excel-worksheet-functions/22762-function-needed-please.html)

Stadinx

Function needed please
 
hI
I am a beginner in excel and trying to work out a formula / function which
help me work easier and quicker. I will get straight into it.

If cell A1 = Lettuce and A2 = Orange and A3= Carrot, how do I make columns
B1 and B3 categroise these as vegetables by using a function?

I hope this makes sense
Thanks
Stadinx

Rowan

If you are only going to have Lettuce, Orange or Carrot then you can enter a
formula like this into cell B1 and copy it down:
=IF(A1="Orange","Fruit","Vegetable")

In the more likely case where your list contains more than just these three
you should have a lookup list and use the vlookup function. The lookup list
can be on the same sheet, a different sheet or even a different workbook. It
will hold a list of all Options and their categories. So my lookup list is on
Sheet2 with the Options in Column A and the categories in Column B something
like this:

Orange Fruit
Lettuce Vegetable
Carrot Vegetable
Pear Fruit

Back on sheet1 in Cell B1 I can then add the formula
=VLOOKUP(A1,Sheet2!$A$1:$B$3,2,0)
and copy it down.
See help on vlookup for more information.

Hope this helps
Rowan

"Stadinx" wrote:

hI
I am a beginner in excel and trying to work out a formula / function which
help me work easier and quicker. I will get straight into it.

If cell A1 = Lettuce and A2 = Orange and A3= Carrot, how do I make columns
B1 and B3 categroise these as vegetables by using a function?

I hope this makes sense
Thanks
Stadinx



All times are GMT +1. The time now is 02:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com