Copy link to clipboard
Copied
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"))))
Copy link to clipboard
Copied
you have "curly" quote marks at the beginning of Marketing, Finance and Management. Change those to "straight" quote marks
Copy link to clipboard
Copied
Thanks Carlos, I've tried straight ones but it still gives an error.
Copy link to clipboard
Copied
I thought I found it. macOS needs a ; (semi colon) instead of a comma. But still I get an 'unknown error' in Illustrator.
Copy link to clipboard
Copied
I have no experience with Macs, your formula worked well on Windows once I replaced the curly quotes
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
ok, perhaps you're entering the formulas in a csv file in excel? CSV files don't support formulas.
If that's the case, you should have a master excel file with formulas, then export to csv before using it in Illustrator.
Copy link to clipboard
Copied
that does seem to work better. At least I don't get the error in Illustrator. But still the image doesn't change. Thanks for your help , much appreciated.
Copy link to clipboard
Copied
try using "/" (forward slash) instead of "\". Windows works with both, mac might not.
also, can you post a screenshot of your spreadsheet column headers?
Copy link to clipboard
Copied
Hi Carlos, sorry for the late rtesponse.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now