edit my index match Formula to say if SKU has the word Multi4 or Multi3 etc times result by that number?

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
3,194
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi everyone,
I've got a bit of a problem
I do an index match of my sku's to tell me my stock levels from my weekly CSV readout.

I put the data into sheet "CSV" the simply have a formula in sheet "Stock Level" that index matches the Sku in "D6" (for example) with the data in sheet "CSV"

CSV column K holds the stock levels
CSV column C holds the SKU's

the formula is

=
index('CSV'!$K:$K,match(D139,'CSV'!$C:$C,0))

The problem I have is some SKU's are for multi packs so the volue sold needs to be multiplied by the Multipack Number,
the multi pack number is show in the SKU if its multi pack like this

AAAA-AA-AAA-3PK-AAA for 3 pack
or
AAAA-AA-AAA-4PK-AAA for 4 pack etc.

if there is no multi pack 3PK is replaced by it size 10mg for example

so what I need is a way to say in the formula if this sku after the 3rd "-" contains "*PK" the times the lookup value by the number??

any ideas how I can do this??

thanks

Tony
<strike>
</strike>

 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
is the sku always the same number of characters
ie
pk is always char 14/15

=mid(cell, 14, 2 )
=MID(A2,14,2)

then =mid(cell, 13, 1 )*1
gives the number
 
Upvote 0
=MID(A1,FIND(CHAR(1),SUBSTITUTE(A1,"-",CHAR(1),3))+2,2)
will find the 3rd occurrence of -
then you can use

then use the index in an IF to extract
A if it = PK and then if it does * by the pack number
Just not sure what you want to multiple by 3 or 4

=IF(MID(index('CSV'!$K:$K,match(D139,'CSV'!$C:$C,0)),FIND(CHAR(1),SUBSTITUTE(index('CSV'!$K:$K,match(D139,'CSV'!$C:$C,0)),"-",CHAR(1),3))+2,2)="PK", MID(index('CSV'!$K:$K,match(D139,'CSV'!$C:$C,0)),FIND(CHAR(1),SUBSTITUTE(index('CSV'!$K:$K,match(D139,'CSV'!$C:$C,0)),"-",CHAR(1),3))+1,1),"n")

is it the value in K you want to X by 3 or 4
and if no PK
then what do you want to X the value by 1

i have just put N for is PK is not found
 
Last edited:
Upvote 0
Excel Workbook
FGHIJ
10Value to lookupresult
111311123-123-123-3pk-ccccc
1221123-123-123-3md-ccccc
1331123-123-123-3ch-ccccc
1441123-123-123-3pk-ccccc
Sheet1
 
Upvote 0
you are welcome
i suspect one of the more experienced members may be able to provide a simple solution , but thats all i can think of
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,868
Members
449,053
Latest member
Mesh

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