Help

Re: Formula - whats wrong?

888 0
cancel
Showing results for 
Search instead for 
Did you mean: 
trond_arntzen
4 - Data Explorer
4 - Data Explorer

It’s my first time with formulas. Can you see whats wrong with this one?

IF(medlemskode = 78878, IF(medlemskode = 121381, IF(medlemskode = 121380, “ordinært medlem”, “støttemedlem”, “studentmedlem”)

1 Reply 1
Christoff
7 - App Architect
7 - App Architect

An IF statement follows this logic:
If the value is true, then you want whatever you specify after the first comma.
If the value is false, then you want whatever you specify after the second comma.

Technically:
IF(logical, value1, value2) returns value1 if the logical argument is true, otherwise it returns value2.

I think you want this:
IF(medlemskode=78878,“ordinært medlem”, IF(medlemskode=121381,“støttemedlem”, IF(medlemskode=121380,“studentmedlem”,“ukjent”)))

You must determine what happens if medlemskode does not equal 78878, 121381 or 121380. In my formula, you get “ukjent”.

Also, remember that the number of opening parentheses “(” must match the number of closing parentheses “)”.