Forum Discussion
Create a formula to fill in data based on cell
- Aug 23, 2020
The formula should be like this...
=IF(A1="Cow",400,IF(A1="Chicken",5,IF(A1="Pig",50,"")))But I would suggest that instead of hard coding the item and it's price in the above formula, you should create a price list somewhere in the file and then you can use VLookup formula to get the priced of the item you input in column B.
The attached has two sheets which show both the methods.
The formula should be like this...
=IF(A1="Cow",400,IF(A1="Chicken",5,IF(A1="Pig",50,"")))
But I would suggest that instead of hard coding the item and it's price in the above formula, you should create a price list somewhere in the file and then you can use VLookup formula to get the priced of the item you input in column B.
The attached has two sheets which show both the methods.
- RepublicsFuryAug 23, 2020Copper Contributor
- Subodh_Tiwari_sktneerAug 23, 2020Silver Contributor
You're welcome! Did that resolve your issue? If yes, please take a minute to accept the post with the proposed solution as a Best Response in order to mark your question as Solved.
- RepublicsFuryAug 23, 2020Copper Contributor
New at the posting and accepting... .thanks for the help.
I think I did it right and accepted that as the right response. It did solve the issue. I'll create the Price List on a Worksheet and then use that as the reference for the formula on each other Worksheet inside the Workbook.
Thanks again!
- RF