Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Variables IF code is not working

Explorer ,
Jul 15, 2025 Jul 15, 2025

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

TOPICS
How-to
298
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Jul 16, 2025 Jul 16, 2025

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

 

CarlosCanto_0-1752653184965.png

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 17, 2025 Jul 17, 2025

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 17, 2025 Jul 17, 2025

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

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 20, 2025 Jul 20, 2025

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 20, 2025 Jul 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. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 20, 2025 Jul 20, 2025

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 20, 2025 Jul 20, 2025

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 21, 2025 Jul 21, 2025

try using "/" (forward slash) instead of "\". Windows works with both, mac might not.

 

also, can you post a screenshot of your spreadsheet column headers?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 07, 2025 Aug 07, 2025
LATEST

Hi Carlos, sorry for the late rtesponse.

Scherm­afbeelding 2025-08-07 om 2.38.14 PM.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines