Having issues with Formula!!!

JB2385

New Member
Joined
Apr 26, 2023
Messages
11
Office Version
  1. 365
Platform
  1. Windows
I am going to break down how I am understanding a portion of this formula below thus will lead to my question.

Formula:

=IF(AND(B$13<>"",$A14<>""),SUMPRODUCT((SUBSTITUTE($A$3:$A$10,"1/","")=TRIM(SUBSTITUTE($A14,"Site","")))*($D$3:$D$10=B$13)),"")

The portions of the formula =TRIM(SUBSTITUTE($A14,"Site","") is essential taking out "Site" from the cell and leaving the Site number and in this case its reading it as 1 instead of Site 1. Please correct me if I am wrong.

My question is how can I had a second =Trim(substitute like above or do I not need it? My assumption would be like this (below). Again correct me if I am wrong.

=IF(AND(F$13<>"",$A14<>""),SUMPRODUCT((SUBSTITUTE($A$3:$A$10,"/5","")=TRIM(SUBSTITUTE($A14,"Site","")=TRIM(SUBSTITUTE($F13,"Ford 1.1","")))*($E$3:$E$10=F$13)),""))

In my master tracker I have another substitution I need input in F14 and the example above is how I was thinking it would be implemented however, I am receiving #VALUE! in the cell F14 instead of the number. The "Ford 1.1" is what I am trying to substitute so the formula will only count Type III instead of "Ford 1.1". I am using the first formula in all my other cells except column F. I hope this was descriptive enough. Please let me know if there any questions.
 

Attachments

  • formula 3.png
    formula 3.png
    31.2 KB · Views: 7
here's a way you could do it that's not specific for a particular make/model
-----------------
4-26-23.xlsx
ABCDEFGHIJKLM
1
2DISTRICT / SITEPARKING SLOT #VINMAKEMODELChevroletToyotaDodgeFord 1.0Ford 1.1 Type III
31/1120JH4KA3170LC006787Chevrolet2.6site 122111
41/111JS1RF16C442100152Ford 1.1Type IIIsite 200000
51/1122C4GM68475R667819DodgeORV site 300000
61/1651P4GH44R0RX359386Chevrolet2.1site 401000
71/1121P4GH44R0RX359386ToyotaORV II
81/111GBJ7D1B4BV132373Ford 1.0Type III
91/466JH4KA2640GC004861ToyotaORV II
101/141JH4CC2640NC004693ToyotaORV II
Sheet2
Cell Formulas
RangeFormula
I3:M6I3=IF(AND(I$2<>"",$H3<>""),SUMPRODUCT(--(SUBSTITUTE($A$3:$A$10,"1/","")=SUBSTITUTE($H3,"site ","")),IFERROR(IF(MATCH(I$2,$D$3:$D$10,0),--(I$2=$D$3:$D$10)),--(I$2=CONCATENATE($D$3:$D$10," ",$E$3:$E$10)))),"")
 
Upvote 0

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Forum statistics

Threads
1,214,859
Messages
6,121,963
Members
449,059
Latest member
oculus

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