[SOLVED] IF Statement Not Accepting Parameters – Spreadsheets

Issue

I have a large spreadsheet that I am automating. I want to get a IF statement to accept multiple parameters. Can’t seem to get this to work. I have lines where AIxxxx are either 160 or 320, but the outcome below still provides the original value or 160, 320, ect.

=IF(AI1264={10,20,40,80,160,320,640,1280,2560,5120,10240,20480},5,AI1264)

AIxxx is the original value I am looking at and determining if it equals 10,20,40,80,etc,etc. If it does, I want the output to be 5. If it does not equal one of the above, it should show the original value of AIxxx

I could break this out into a large IFS statement, or make each variable challenge a separate column, but that would make the spreadsheet even bigger, so I would like to get this working.

Any help is appreciated!

Solution

or try long way:

=IF(REGEXMATCH(AI1264&"", "10|20|40|80|160|320|640|1280|2560|5120|10240|20480"), 5, AI1264)

Answered By – player0

Answer Checked By – Mildred Charles (BugsFixing Admin)

Leave a Reply

Your email address will not be published.