Hello Friends
I have a requirement where if either of values are present then i need to put a particular value in other column.This can be done using a IF-ELSE statement but the problem here is a lot of values to be checked. For ex
If column A IN ('A','B','C'......15 values) then Column B='Value'
Any simpler way to implement this.
Thanks in advance
Regards
Ulhas
logic required
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
As noted, you don't need a loop. A single Index() function can check all possible values. Delimit them, and the search string, with some character (space will do). For example, the following function will return 0 if not found and some non-zero value if found.
Code: Select all
Index(" A B C D E F G H I J K L M N O ", " " : InLink.ColumnA : " ", 1)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 72
- Joined: Wed Dec 12, 2007 2:29 am