Is it possible to layer more than one IF func...

(Russell Van) #1

Is it possible to layer more than one IF function?

Eg: =IF([No. of Days]<2,LOOKUP(‘1’, ‘Prices’, ‘Days’, ‘Set Prices’)[No. of Days],0),IF([No. of Days]>1or <8,LOOKUP(‘2 to 7’, ‘Prices’, ‘Days’, ‘Set Prices’)[No. of Days],0)

Something like this… (This one doesn’t work just an example…)

I have a cerctian price for 1 day (100) and a different price for 2 to 7(80) days…

(David Hopkins) #2

Oh yeah!

I have one crazy display that has 4.

(Russell Van) #3

@David_Hopkins Dude!:smiley: Please could you show me an example?

(John Gardner) #4

You may also want to use the SWITCH function instead of IF.

(David Hopkins) #5

@John_Gardner I love switch when there are multiple options. I’ve even started playing with a switch that will run a different SELECT statement based on the value of a col. so, I can get different results depending on what type of element is being viewed.

(Russell Van) #6

@John_Gardner @David_Hopkins Thanks guys! I’m back on track.