Help with multiple IF statement referencing text

murraythek

Board Regular
Joined
Aug 31, 2015
Messages
61
I have a drop down list created with 12 different vehicles both import and domestic.

I'm trying to create an if statement so that when only the imports are selected then the word "import" is populated in a specified cell. B1 is the drop down list. C1 is the specified cell for the word import.

Example: Example: =IF(B1=Fiat 500,"Import",IF(B1=Subaru Impreza,"Import",IF(B1=BMW 7 series,"Import")))

Excel is barking at me that the equals sign isnt correct after B1 and to add an ' but that doesnt work either. Please help.
 
Ok one more question. Now what if I also want to include the domestic vehicles? How do I nest that into the function below:

=if ( OR ( B1="fiat 500", B1="Subaru", B1="BMW") , left(B1 , 6) & " Import", "")

Do I just duplicate the formula but change Import to Domestic? If so how do I tie it all together?

Thanks again!
 
Upvote 0

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Ok here is a link to my workbook. I'm trying to get this formula to work so that it will return either "Import" or "Domestic".

https://1drv.ms/f/s!AuCQ51lJiDqXrn3lrkx_-SS10APE

Thanks!
Please keep in mind that many members of this forum, including myself, are unable or unwilling to download files from file-sharing sites.

On the formula: as I suggested in Post #4, you can avoid writing a long OR(...) function by adding three spaces to each import's name in your list, like this:
Code:
1990's Volvo   ,1980's Volvo   ,1990's Domestic Make,1980's Domestic Make

With those triple spaces in place, you can use the following short formula:
Code:
=LEFT(B1,7)&IF(RIGHT(B1,3)="   ","Import","Domestic")
 
Last edited:
Upvote 0
Sorry, I was asked earlier to provide a copy of the workbook so I assumed it was ok.

Here is a screenshot and what I have setup so far. Cant seem to get your recommendation working.

I clearly have the import / domestic set up wrong as you can see I have the 1970's Ford selected and the output is 1970's import.

 
Last edited:
Upvote 0
Inside the brackets of the OR(...) construct you should list only imports to get the desired results.
As evident from your screenshot, "1970's Ford" is listed inside the OR(...) brackets, so the formula returns "1970's Import".
 
Upvote 0
i mentioned the share - using dropbox/onedrive - which if requested , i dont mind opening files in those shared services.
sometimes its easier to see the issue.

as mentioned members do not like using filesharing here
Also the examples when used on filesharing , even dropbox are often removed and so , from a past searching point of view that information is lost
So i know the forum prefers to use programs like

As mentioned on the rules
Likewise, please do not answer questions by creating solutions elsewhere and then referencing those solutions via file links. We ask that you answer the question within the thread itself (note: providing links to existing articles on the internet is acceptable).

To that effect, do not simply create a file with a solution, and provide a link to that. Some of the issues with providing links to files uploaded to the internet are: those links often expire, many users cannot download files from file-sharing sites due to network security restrictions, many users are reluctant to download files for personal security reasons and the ability to search the forum effectively is reduced.

I have tried to use the preferred add-in tools like jeanie but not been able to get to work on 2 PC using excel 2013 /16 despite a lot of trying
 
Upvote 0
in your List B15:C38
in column C
for all the cars you want to mark as import - put the word import in that cell
and then you can use

=IF(VLOOKUP(B7,B15:C38,2,FALSE)=0,"",VLOOKUP(B7,B15:C38,2,FALSE))

this will lookup the car and return import or 0
i have used an IF() to stop the 0 showing, but , i assume you want other values for those cars any way
as you have a list with validation , so noone can type in the dropdown, you should not get any errors from the lookup

hope that helps

I assume you want all the other cars to show as domestic, so just add that to the C column

https://www.dropbox.com/s/wqrwsxh3oc4rir5/Auto Workbook_etaf.xlsx?dl=0
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,523
Messages
6,131,171
Members
449,627
Latest member
ChrisNoMates

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top