=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

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Try this -

Excel Formula:
=IF(SUMPRODUCT((I9<$K$9:$K$17)*(K9>$I$9:$I$17)*(IFERROR(FIND(N9,$N$9:$N$17),0)))>1,"Check","Available")
 
Upvote 0
VBA Code:
=IF(COUNTIFS($K$9:$K$17,">"&I9,$I$9:$I$17,"<"&K9,$N$9:$N$17,"*"&N9&"*")>1,"Check","Available")
 
Upvote 0
Try this -

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

Sorry this still hasn't worked, have attached image.

Dates overlap but the equipment results are different yet it still returns Check in column P
 

Attachments

  • E&O Example UPDATE.png
    E&O Example UPDATE.png
    42 KB · Views: 4
Upvote 0
VBA Code:
=IF(COUNTIFS($K$9:$K$17,">"&I9,$I$9:$I$17,"<"&K9,$N$9:$N$17,"*"&N9&"*")>1,"Check","Available")

This has worked slightly better as it returned row 10 as "available" and row 9 as "check" due to both having "Birdie......" within column N.

Ideally I need both rows to say check if they have matching values in column N.
 

Attachments

  • E&O Example UPDATE 2.png
    E&O Example UPDATE 2.png
    42.7 KB · Views: 2
Upvote 0
Sorry this still hasn't worked, have attached image.

Dates overlap but the equipment results are different yet it still returns Check in column P
See Uploading image doesn't help in checking error.

Better upload a sample data using XL2BB utility to find what's going wrong.
 
Upvote 0
Equipment Log Template.xlsm
BCDEFGHIJKMNOPQRS
8InitalsAFA RequestBooking RefBooking NameContact NumberContact EmailLodge NumberCheck in DateNightsCheck OutArchiveCP Equipment Required3rd Party Equipment RequestedAvailabilityPO RequiredPO NumberComments
9Fri 26 Aug 20223Mon 29 Aug 2022FALSESunlift Micro HoistCheck
10Fri 26 Aug 20227Fri 02 Sep 2022FALSEGeeco Small White Shower Chair Birdie Compact HoistCheck
11  Check
12  Check
13  Check
14  Check
15  Check
16  Check
17  Check
Equipment
Cell Formulas
RangeFormula
K9:K17K9=IF(J9="","",I9+J9)
M9:M17M9=IF(J9="","",IF(K9<TODAY(),TRUE,FALSE))
P9:P17P9=IF(SUMPRODUCT((I9<$K$9:$K$17)*(K9>$I$9:$I$17)*(IFERROR(FIND(N9,$N$9:$N$17),0)))>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
I thing I just realized - FIND is a case sensitive while SEARCH is not you can try that -

Excel Formula:
=IF(SUMPRODUCT((I9<$K$9:$K$17)*(K9>$I$9:$I$17)*(IFERROR(SEARCH(N9,$N$9:$N$17),0)))>1,"Check","Available")
 
Upvote 0
Sorry its still not working - it is matching overlapping dates but not matching any text in column N.

I have added overlapping dates but selected different equipment but it still returns "Check".

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.
 
Upvote 0
Equipment Log Template.xlsm
BCDEFGHIJKMNOPQRS
8InitalsAFA RequestBooking RefBooking NameContact NumberContact EmailLodge NumberCheck in DateNightsCheck OutArchiveCP Equipment Required3rd Party Equipment RequestedAvailabilityPO RequiredPO NumberComments
9Fri 26 Aug 20223Mon 29 Aug 2022FALSESunlift Micro HoistCheck
10Fri 26 Aug 20227Fri 02 Sep 2022FALSEGeeco Small White Shower Chair Birdie Compact HoistCheck
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(SUMPRODUCT((I9<$K$9:$K$17)*(K9>$I$9:$I$17)*(IFERROR(SEARCH(N9,$N$9:$N$17),0)))>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

Forum statistics

Threads
1,215,444
Messages
6,124,891
Members
449,194
Latest member
JayEggleton

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