Fishboy

Well-known Member
Joined
Feb 13, 2015
Messages
4,267
Hi all,

I am trying to find a way to incorporate wildcards into a number of formulas in Excel 2010 if possible.

Basically I have a sheet called "Raw Sales Data" which contains all sales of all items, and on another sheet called "Sales Ledger" I use various formulas to count how many sales there have been, how much they went for, what the max, min and average prices were etc etc.

Everything is working fine for items with entirely unique names, however there are a number of items in "Raw Sales Data" where the prefix of an item name is of standard format (e.g "Whispering Iron Band"), but there are a number of possible suffixes e.g. "Whispering Iron Band of the Fanatic", "Whispering Iron Band of the Deft" and so on).

I am looking to find a way for the following formulas to search for "Whispering Iron Band*" so that it counts all entries with this prefix as a single group of items.

These are the current formulas that I need to incorporate wildcards into (where $B12 needs the wildcard added):

=(INDEX(Data_MarketValue, MATCH($B12, Data_Item, 0))/10000)

{=(MAX((Sales_Item=$B12)*Sales_ItemValue)/10000)}

{=(MIN(IF(Sales_Item=$B12,Sales_ItemValue))/10000)}

{=IFERROR((AVERAGE(IF(Sales_Item=$B12,Sales_ItemValue))/10000),"0.00")}

=(SUMPRODUCT(((Sales_Item)=$B12)*(Sales_QuantitySold)*(Sales_ItemValue)))/10000

I am aware that not all Excel functions work properly when a wildcard is introduced, but I am hoping it is possible to doctor these to accommodate.

Does anyone have any ideas?
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
For MATCH you can add a wildcard, i.e. $B12&"*". Otherwise you need:

LEFT(Sales_Item,LEN($B12))=$B12
Hi Andrew, thanks for your prompt reply. The change to the MATCH formula was simple enough and easy to implement, but I am a little confused with the other answer.

How exactly do I plug LEFT(Sales_Item,LEN($B12))=$B12 into the existing formulas? Am I literally just replacing Sales_Item=$B12 as below?

{=(MAX((LEFT(Sales_Item,LEN($B12))=$B12)*Sales_ItemValue)/10000)}
 
Upvote 0
Nevermind, I have worked it out. You suggestion works great! Thanks for your help!
 
Upvote 0

Forum statistics

Threads
1,215,374
Messages
6,124,566
Members
449,171
Latest member
jominadeo

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