ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Formula for Inputing a Value based on a Condition (https://www.excelbanter.com/excel-worksheet-functions/157631-formula-inputing-value-based-condition.html)

la90292

Formula for Inputing a Value based on a Condition
 
I have a worksheet for my YTD business expenses. Column C is Description.
Column E is Category. If for example, Union 76 is in the Description
column, I want to the corresponding cell in the E column to be, "Auto: Fuel"
so all the descriiptions of Union 76 will be categorized, Auto: Fuel.

Thank you in advance for your time and consideration.

Best regards,
SeaTiger



kassie

Formula for Inputing a Value based on a Condition
 
You can either use an IF statement, provided you do not have a lot of
categories, or you could set up a list of descriptions and their related
categories, and then use a VLOOKUP statement. Something like
=IF(C2="","",VLOOKUP(C2,CatList,2,FALSE)). In the example, your list of
descriptions and categories would be named CatList

--
Hth

Kassie Kasselman
Change xxx to hotmail


"la90292" wrote:

I have a worksheet for my YTD business expenses. Column C is Description.
Column E is Category. If for example, Union 76 is in the Description
column, I want to the corresponding cell in the E column to be, "Auto: Fuel"
so all the descriiptions of Union 76 will be categorized, Auto: Fuel.

Thank you in advance for your time and consideration.

Best regards,
SeaTiger




la90292

Formula for Inputing a Value based on a Condition
 
Hi Kassie:

Thank you for your suggestion. I'm a little lost as to how to set up the
CatLst as your recommend. Do I create a new Column, CatLst and input, using
my example, Union 76 Auto: Fuel?

Thanks,
SeaTiger

"kassie" wrote in message
...
You can either use an IF statement, provided you do not have a lot of
categories, or you could set up a list of descriptions and their related
categories, and then use a VLOOKUP statement. Something like
=IF(C2="","",VLOOKUP(C2,CatList,2,FALSE)). In the example, your list of
descriptions and categories would be named CatList

--
Hth

Kassie Kasselman
Change xxx to hotmail


"la90292" wrote:

I have a worksheet for my YTD business expenses. Column C is
Description.
Column E is Category. If for example, Union 76 is in the Description
column, I want to the corresponding cell in the E column to be, "Auto:
Fuel"
so all the descriiptions of Union 76 will be categorized, Auto: Fuel.

Thank you in advance for your time and consideration.

Best regards,
SeaTiger






kassie

Formula for Inputing a Value based on a Condition
 
Not knowing the setup of your sheet, maybe on sheet 2, type in a list of your
descriptions, say in Col A. Then in Col B, enter the category for each
description, next to the latter. Say in A1 you have Union 76, then in B1
enter Auto : Fuel, in A2 enter say Appleton Parkade, then in B2 Auto :
Parking, and so on. Sort this list alphabetically on Col A. Iow, Select
A1:Bwhatever, click on Data, Sort, Col A. Now click on Insert, Name, Define,
and type in CatList, or whatever you prefer to call this list.

--
Hth

Kassie Kasselman
Change xxx to hotmail


"la90292" wrote:

Hi Kassie:

Thank you for your suggestion. I'm a little lost as to how to set up the
CatLst as your recommend. Do I create a new Column, CatLst and input, using
my example, Union 76 Auto: Fuel?

Thanks,
SeaTiger

"kassie" wrote in message
...
You can either use an IF statement, provided you do not have a lot of
categories, or you could set up a list of descriptions and their related
categories, and then use a VLOOKUP statement. Something like
=IF(C2="","",VLOOKUP(C2,CatList,2,FALSE)). In the example, your list of
descriptions and categories would be named CatList

--
Hth

Kassie Kasselman
Change xxx to hotmail


"la90292" wrote:

I have a worksheet for my YTD business expenses. Column C is
Description.
Column E is Category. If for example, Union 76 is in the Description
column, I want to the corresponding cell in the E column to be, "Auto:
Fuel"
so all the descriiptions of Union 76 will be categorized, Auto: Fuel.

Thank you in advance for your time and consideration.

Best regards,
SeaTiger








All times are GMT +1. The time now is 01:47 AM.

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