If function
Hi Experts,
I tried to use an IF function to create the following output.
If Name is Peter and XY is NC than result should be 1,5
If Name is Lenn and XY is NC than result should be 1
same as below for Julia.
I start with this:
=IF(AND([Name]@row = "Peter", [XY]@row = "NC"), "1,5") it works but as soon as I add another IF .... I fail.
I tried this
=IF(AND([Name]@row = "Peter", [XY]@row = "NC"), "1,5"), IF(AND([Name]@row = "Lenn", [XY]@row = "NC"), "1")
but got an error.
I would need to check for 5 different names but only for one XY.
But would be good to know to check as well for 2 XY as I need it for another column later as well.
Would be great if you could help me.
Thanks in advanced
Best Answer
-
You are closing your first IF statement too early. The second IF statement should go in the "else" portion of the first and then you close them all at the end.
=IF(AND([Name]@row = "Peter", [XY]@row = "NC"), "1,5", IF(AND([Name]@row = "Lenn", [XY]@row = "NC"), "1"))
Answers
-
You are closing your first IF statement too early. The second IF statement should go in the "else" portion of the first and then you close them all at the end.
=IF(AND([Name]@row = "Peter", [XY]@row = "NC"), "1,5", IF(AND([Name]@row = "Lenn", [XY]@row = "NC"), "1"))
-
thanks a lot it works!
-
Happy to help. 👍️
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.3K Get Help
- 392 Global Discussions
- 213 Industry Talk
- 447 Announcements
- 4.6K Ideas & Feature Requests
- 141 Brandfolder
- 132 Just for fun
- 131 Community Job Board
- 453 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 292 Events
- 35 Webinars
- 7.3K Forum Archives