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
- Customer Resources
- 64.5K Get Help
- 424 Global Discussions
- 136 Industry Talk
- 465 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 145 Just for fun
- 62 Community Job Board
- 465 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 301 Events
- 39 Webinars
- 7.3K Forum Archives