Help creating a formula for stock control

conna_1996

New Member
Joined
Jun 30, 2024
Messages
1
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
Hello. I am trying to create a formula that counts all the letter's different character types in the registration collum based on the plate style. for example, I want to count how letter 'a's are present for 3D Gel plate styles. I have tried the Len function which works but does not define between the plate style. I have also tried the countifs with the plate style '3D Gel' as the criteria however this only counts the Cells which contain the letter 'a' and not how many 'a's are present. Would you be able to help me with a formula? I know I will have to use the formula for all plate styles and character types, so it will be complicated, but I just can't figure out the working formula or if its even possible
 

Attachments

  • Capture.PNG
    Capture.PNG
    24 KB · Views: 11

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Something like this?

Excel Formula:
=LET(
style,FILTER(M2:M7,S2:S7="3D Gel"),
letters,DROP(REDUCE("",style,LAMBDA(a,b,VSTACK(a,MID(b,SEQUENCE(LEN(b)),1)))),1),
counts,SORT(LET(array,(letters),HSTACK(UNIQUE(array),MAP(UNIQUE(array),LAMBDA(x,SUM(--(array=x))))))),
abc,CHAR(SEQUENCE(26,,97)),
HSTACK(abc,XLOOKUP(abc,CHOOSECOLS(counts,1),CHOOSECOLS(counts,2),0)))
 
Upvote 0
Try:
Book1
ABCDE
1Car RegistrationPlate Style
2ab12 ccc3D GelOption 15
3aa12 ccc4DOption 25
4ab12 aav3D Gel
5ab12 ccc3D Gel
6bb12 ccc4D
Sheet1
Cell Formulas
RangeFormula
E2E2=LET(t,CONCAT(FILTER(Table1[Car Registration],Table1[Plate Style]="3D Gel",0)),SUM(--(MID(t,SEQUENCE(LEN(t)),1)="a")))
E3E3=SUM((Table1[Plate Style]="3D Gel")*(LEN(Table1[Car Registration])-LEN(SUBSTITUTE(Table1[Car Registration],"a",""))))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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