Skip to main content
Rudi Spitzers
Inspiring
Jul 15, 2025 9:39 AM UTC
Question

Variables IF code is not working

Hi,

I'm using variables to change an image when a certain category is used. So if  'Finance'  is used  the image of 'taart' should be displayed.

My spreadsheet skills are limited but I came up with the code below. Somehow I get an error when using this code. I hope somebody in this community can figure what's wrong. Thanks.

 

=IF(C2="Ice Maker","\Users\rudispitzers\Documents\03_theorie\illustrator_2025\assets expert\ijsje.png",IF(C2=”Marketing","\Users\rudispitzers\Documents\03_theorie\illustrator_2025\assets expert\sorbet.png",IF(C2=”Finance","\Users\rudispitzers\Documents\03_theorie\illustrator_2025\assets expert\taart.png",IF(C2=”Management","\Users\rudispitzers\Documents\03_theorie\illustrator_2025/assets expert\soda.png"))))

9 replies

Rudi Spitzers
Inspiring
Jul 18, 2025 6:27 AM UTC

I thought I found it. macOS needs a ; (semi colon) instead of a comma. But still I get an 'unknown error' in Illustrator.

 

 

Translate
CarlosCanto
Community Expert
Community Expert
Jul 20, 2025 7:20 AM UTC

I have no experience with Macs, your formula worked well on Windows once I replaced the curly quotes

Translate
Rudi Spitzers
Inspiring
Jul 20, 2025 1:07 PM UTC

The problem is that Illustrator can't find the path. I followed the instructions of the Adobe Help File but somehow the =IF formula doesn't work on a Mac. If it's just an image without the conditions it works fine. 

Translate
CarlosCanto
Community Expert
Community Expert
Jul 16, 2025 8:09 AM UTC

you have "curly" quote marks at the beginning of Marketing, Finance and Management. Change those to "straight" quote marks

 

 

Translate
Rudi Spitzers
Inspiring
Jul 18, 2025 6:24 AM UTC

Thanks Carlos, I've tried straight ones but it still gives an error.

Translate