=IF SUMPRODUCT Formula

uk_2022

New Member
Joined
Aug 7, 2022
Messages
29
Office Version
  1. 365
Platform
  1. Windows
I have got a =if sumproduct formula below

=IF(SUMPRODUCT((I9<$K$9:$K$17)*(K9>$I$9:$I$17)*(N9=$N$9:$N$17))>1,"Check","Available")

however I need the (N9=$N$9:$N$17) section to find values within the text.

Values in column N are entered from a drop down list (a VBA allow multiple selections).

I have attached a image of my worksheet;

Example: Check in dates overlap and both rows contain "Birdie Compact Hoist" in column N, however row 10 also contains "Aquatec......." in the same cell.

Currently, column P is returning "available" as per the formula above as it is not picking up that "Birdie Compact Hoist" has appeared in both cells.

Can anyone suggest a solution how the formula can pick out matching values from the text in column N?

TIA
 

Attachments

  • E&O Example.png
    E&O Example.png
    32.6 KB · Views: 6
I only need it to return "Check" if the date overlap others AND the equipment in column N match. I.E if both rows had "Birdie Compact Hoist" within the values. (See row 10 - it also has "Geeco....." but I still need the formula to recognise that "Birdie....." appears with the text.
This is happening because when N10 doesn't exactly matches N9

I'm trying to think of some workaround.
 
Upvote 0

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
another user suggested

Excel Formula:
=IF(COUNTIFS($K$9:$K$17,">"&I9,$I$9:$I$17,"<"&K9,$N$9:$N$17,"*"&N9&"*")>1,"Check","Available")

which did recognize the text match but it returns one row as "Check" and the other as "Available". I need it so return "check" for both so that user can then amend equipment required to prevent the "check" from occurring.
 
Upvote 0
Equipment Log Template.xlsm
IJKMNOPQR
8Check in DateNightsCheck OutArchiveCP Equipment Required3rd Party Equipment RequestedAvailabilityPO RequiredPO Number
9Fri 26 Aug 20223Mon 29 Aug 2022FALSEBirdie Compact HoistCheck
10Fri 26 Aug 20227Fri 02 Sep 2022FALSEAquatec Ocean (XL) Shower/over toilet chair with small wheels Birdie Compact HoistAvailable
11  Available
12  Available
13  Available
14  Available
15  Available
16  Available
17  Available
Equipment
Cell Formulas
RangeFormula
K9:K17K9=IF(J9="","",I9+J9)
M9:M17M9=IF(J9="","",IF(K9<TODAY(),TRUE,FALSE))
P9:P17P9=IF(COUNTIFS($K$9:$K$17,">"&I9,$I$9:$I$17,"<"&K9,$N$9:$N$17,"*"&N9&"*")>1,"Check","Available")
Cells with Data Validation
CellAllowCriteria
Q9:Q17ListTo Raise, Raised
N9:N17List=Lists!$A$2:$A$12
O9:O17List=Lists!$B$2:$B$23
 
Upvote 0
another user suggested

Excel Formula:
=IF(COUNTIFS($K$9:$K$17,">"&I9,$I$9:$I$17,"<"&K9,$N$9:$N$17,"*"&N9&"*")>1,"Check","Available")

which did recognize the text match but it returns one row as "Check" and the other as "Available". I need it so return "check" for both so that user can then amend equipment required to prevent the "check" from occurring.
Either ways it will match the exact values of a cell and return accordingly.

Instead of having 1 column N for Equipment required, Can we have 2 or more Columns to avoid this error.
 
Upvote 0
Either ways it will match the exact values of a cell and return accordingly.

Instead of having 1 column N for Equipment required, Can we have 2 or more Columns to avoid this error.

do you mean have a column for each piece of equipment?

how would that work with the formula?
 
Upvote 0
Blue Wheeled CommodeLinton Plus Raised Toilet SeatGeeco Small White Shower ChairAquatec Ocean (XL) Shower/over toilet chair with small wheelsAquatec Ocean (XL) Shower chair only with large wheelsBed Rail Inserts for Bakare Profiling BedsBirdie Compact HoistSunlift Micro HoistHoist (TBC)Sunlift Micro and Birdie Compact (Both)
Existing booking for dates
For delivery this week
For collection this weekSORT COLUMN
Lodge NumberCheck in DateNightsCheck OutArchive3rd Party Equipment RequestedAvailability
Fri 26 Aug 20223Mon 29 Aug 2022FALSEYes
Fri 26 Aug 20227Fri 02 Sep 2022FALSEYesYes
Mon 29 Aug 20224Fri 02 Sep 2022FALSE
 
Upvote 0
do you mean have a column for each piece of equipment?

how would that work with the formula?
After much thought, I found it was better to make some helper columns - see Column Z onwards. That would make things and formula simple and short.

Check if this works for you

If I get some better solution I shall revert back with that.

Meanwhile if some other experts looks at it and they might suggest a better solution.

Book1
HIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJ
1
2Blue Wheeled CommodeLinton Plus Raised Toilet SeatGeeco Small White Shower ChairAquatec Ocean (XL) Shower/over toilet chair with small wheelsAquatec Ocean (XL) Shower chair only with large wheelsBed Rail Inserts for Bakare Profiling BedsBirdie Compact HoistSunlift Micro HoistHoist (TBC)Sunlift Micro and Birdie Compact (Both)
3Existing booking for dates
4For delivery this week
5For collection this weekSORT COLUMN
6
7
8Lodge NumberCheck in DateNightsCheck OutArchive3rd Party Equipment RequestedAvailabilityCheckDtCheck1Check2Check3Check4Check5Check6Check7Check8Check9Check10
944799344802FALSEYesCheck20000002000
1044799744806FALSEYesYesCheck30001002000
1144802444806FALSEAvailable20000000000
12 00000000000
13 00000000000
14 00000000000
15 00000000000
16 00000000000
17 00000000000
Sheet2
Cell Formulas
RangeFormula
Y9:Y17Y9=IFS(AND(I9="",COUNTA(N9:W9)=0),"",AND(Z9>1,COUNTIFS(AA9:AJ9,">"&1)>0),"Check",TRUE,"Available")
Z9:Z17Z9=SUMPRODUCT((I9<$K$9:$K$17)*(K9>$I$9:$I$17))
AA9:AJ17AA9=SUMPRODUCT((N$9:N$17<>"")*(N$9:N$17=N9))
K9:K11K9=IF(J9="","",I9+J9)
M9:M11M9=IF(J9="","",IF(K9<TODAY(),TRUE,FALSE))
 
Upvote 0
Thanks for that however issue with the dates section. It is returning "check" for dates that don't overlap but do check in/out on same dates.

i.e row 9 - check in 26.08.22 and check out 29.08.22
row 10 - check in 29.08.2022 and check out 02.09.2022
 
Upvote 0
Thanks for that however issue with the dates section. It is returning "check" for dates that don't overlap but do check in/out on same dates.

i.e row 9 - check in 26.08.22 and check out 29.08.22
row 10 - check in 29.08.2022 and check out 02.09.2022
Minor change in formula in Column 9 to check overlaps.

Check if this works for you.

Book1
HIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJ
1
2Blue Wheeled CommodeLinton Plus Raised Toilet SeatGeeco Small White Shower ChairAquatec Ocean (XL) Shower/over toilet chair with small wheelsAquatec Ocean (XL) Shower chair only with large wheelsBed Rail Inserts for Bakare Profiling BedsBirdie Compact HoistSunlift Micro HoistHoist (TBC)Sunlift Micro and Birdie Compact (Both)
3Existing booking for dates
4For delivery this week
5For collection this weekSORT COLUMN
6
7
8Lodge NumberCheck in DateNightsCheck OutArchive3rd Party Equipment RequestedAvailabilityCheckDt1Check1Check2Check3Check4Check5Check6Check7Check8Check9Check10
944,799344,802FALSEYesCheck30000002000
1044,799744,806FALSEYesYesCheck40003002000
1144,802444,806FALSEYesCheck20003000000
1244,799344,802YesAvailable30000100000
1344,817344,820YesAvailable10003000000
14 00000000000
15 00000000000
16 00000000000
17 00000000000
Sheet1
Cell Formulas
RangeFormula
Y9:Y17Y9=IFS(AND(I9="",COUNTA(N9:W9)=0),"",AND(Z9>=2,COUNTIFS(AA9:AJ9,">"&1)>0),"Check",TRUE,"Available")
Z9:Z17Z9=SUMPRODUCT((I9<$K$9:$K$17)*(K9>$I$9:$I$17))
AA9:AJ17AA9=SUMPRODUCT((N$9:N$17<>"")*(N$9:N$17=N9))
M9:M11M9=IF(J9="","",IF(K9<TODAY(),TRUE,FALSE))
K9:K13K9=IF(J9="","",I9+J9)
 
Upvote 0

Forum statistics

Threads
1,214,922
Messages
6,122,281
Members
449,075
Latest member
staticfluids

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