If is number search formula

romoguy15

New Member
Joined
Mar 24, 2020
Messages
13
Office Version
  1. 365
Platform
  1. Windows
Hello,

I am having a small issue with this formula I've been trying to figure out. I have in Column A a list of different models of coolers. In column B, I want the formula to generate a price based on each model that matches in column A. The formula that I am using is below.

=IF(ISNUMBER(SEARCH("GDIM-26",A2)),"2000",IF(ISNUMBER(SEARCH("GDM-49",A2)),"2500",IF(ISNUMBER(SEARCH("*GDM-49F*",A2)),"3000",IF(ISNUMBER(SEARCH("GDM-72",A2)),"3500",IF(ISNUMBER(SEARCH("GDM-72F",A2)),"4000",)))))

My issue that I am having is, when Column A contains GDM-49F, it still shows the same value for GDM-49 even though GDM-49F is $3000 This is also happening for GDM 72. If column A contains GDM-72F, it will show the same value as GDM-72. I hope I am explaining this well. Basically, those models, 49, 49F, 72, and 72F need to be I guess unique to their own.
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Hi & welcome to MrExcel.
What exactly do you have in column A?
 
Upvote 0
Hello, In column A I have

GDIM-26NT-HC~TSL01 BLK
GDM-49-HC~TSL01
GDM-72-HC~TSL01
GDM-72-HC~TSL01
GDM-72-HC~TSL01
GDM-49F-HC~TSL01
GDM-49-HC~TSL01
GDM-49-HC~TSL01
GDM-49F-HC~TSL01
 
Upvote 0
In that case just add a hyphen to the enter of the search string.
 
Upvote 0
That worked perfectly thank you. But what if my data does not have those hyphens? Some of the data is all over the place and I just want it to pick up only GDM-72 or GDM-49F. Could I add to this formula a NOT state or something along those lines?
 
Upvote 0
Let me rephrase that, my data will always have a hyphen after the letters GDM. That will be constant. But it will not always have a hyphen after 49 or 72 or 49F
 
Upvote 0
I am honestly puzzled how the hyphen after makes the data unique, but the F after the 49 or 72 does not make it unique. I am hoping to solve because the data further down on some does not include hyphens after.
 
Upvote 0
Would your values always be followed by either a space or a hyphen?
 
Upvote 0

Forum statistics

Threads
1,215,071
Messages
6,122,964
Members
449,094
Latest member
Anshu121

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