Skip to main content
Rudi Spitzers
Known Participant
July 15, 2025
Question

Variables IF code is not working

  • July 15, 2025
  • 2 replies
  • 322 views

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"))))

2 replies

Rudi Spitzers
Known Participant
July 18, 2025

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

 

 

CarlosCanto
Community Expert
Community Expert
July 20, 2025

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

Rudi Spitzers
Known Participant
July 20, 2025

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. 

CarlosCanto
Community Expert
Community Expert
July 16, 2025

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

 

 

Rudi Spitzers
Known Participant
July 18, 2025

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