Test in an Excel spreadsheet
Solved
Maya64200
Posted messages
2
Registration date
Status
Member
Last intervention
-
eriiic Posted messages 24581 Registration date Status Contributor Last intervention -
eriiic Posted messages 24581 Registration date Status Contributor Last intervention -
Hello,
I have a table with two columns and three rows
Apartment = 1
Garage = 0.5
Parking = 0.1
I want the value to be 1 if the cell content is "Apartment"
I want the value to be 0.5 if the cell content is "Garage"
I want the value to be 0.1 if the cell content is "Parking"
How can I program this in my Excel sheet?
I have a table with two columns and three rows
Apartment = 1
Garage = 0.5
Parking = 0.1
I want the value to be 1 if the cell content is "Apartment"
I want the value to be 0.5 if the cell content is "Garage"
I want the value to be 0.1 if the cell content is "Parking"
How can I program this in my Excel sheet?
5 answers
-
Hello,
Assuming that cell A1 contains the text and A2 the value, enter this formula in A2
=IF(A1="Apartment",1,IF(A1="Garage",0.5,0.1))
This means If A1 is equal to Apartment then 1 otherwise If A1 is equal to Garage then 0.5 otherwise 0.1.
Best regards -
-
Dear Chris
This is my first request and my first participation in this forum. I'm discovering and I'm more focused on the functioning of the site than on good manners! You are absolutely right to remind me of some basic principles. So, I sincerely apologize and ask the internet users to forgive me.
Thank you for your response. However, I simplified my problem to be understood. In fact, the list has 16 rows with different values. Can't we run a test on a range of cells?
With my thanks for your responses! -
I'm having a bit of trouble understanding.
Are you saying that there are 16 possible cases?
Simplifying is fine, but it needs to be accurate. -
Hello,
with your name/value table in: $G$2:$H$17:
=VLOOKUP(A2,$G$2:$H$17,2,FALSE)
eric
--
You will never respond to an unsolicited DM...
Well, that's done.