Return value based on two criteria

Sean15

Well-known Member
Joined
Jun 25, 2005
Messages
719
Office Version
  1. 2010
Platform
  1. Windows
Hello:

In C19, I want to lookup date in B2, return it's value in D2 using criteria in C18 and B19
Expected value is shown in C19. Could you offer a suggestion please?

PW 070222.xlsx
ABCD
21-Nov-22RUBS - Water and Sewer - Water For 09/01/22-09/30/22Property40.73
31-Nov-22RUBS - Trash - Trash For 09/01/22-09/30/22Property6.54
41-Nov-22Tax - Tax For 09/01/22-09/30/22Property3.73
51-Nov-22RUBS - Water and Sewer - Sewer For 09/01/22-09/30/22Property6.80
61-Nov-22RUBS Fee - Service Fee For 11/01/22-11/30/22Property4.25
71-Nov-22RUBS - Gas - Gas For 09/01/22-09/30/22Property8.05
81-Nov-22RUBS - Electric - Electric For 09/01/22-09/30/22Property71.73
91-Nov-22Monthly RUBS - Pest Control - Posted from 11/01/2022 to 11/30/2022 - RUBS - Pest ControlProperty5.12
101-Nov-22Monthly Valet Trash - Posted from 11/01/2022 to 11/30/2022 - Valet TrashProperty25.58
111-Nov-22RentProperty1,084.38
121-Nov-22Monthly Facility Fee - Posted from 11/01/2022 to 11/30/2022 - Facility FeeProperty12.22
131-Nov-22Monthly Parcel - Posted from 11/01/2022 to 11/30/2022 - ParcelProperty2.05
141-Nov-22Credit - Valet Trash - Valet Trash Adjustment 11/2022Property(25.58)
15
16
17Expected result by date
1811/1/2022
19water40.73
20trash6.54
21tax3.73
22sewer6.80
23service fee4.25
24gas8.05
25electric71.73
26pest control5.12
27valet trash-
28rent1,084.38
29facility fee12.22
30parcel2.05
311,245.60
32
Sheet1
Cell Formulas
RangeFormula
C31C31=SUM(C19:C30)
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Try this:
Dante Amor
ABCD
1
201/11/2022RUBS - Water and Sewer - Water For 09/01/22-09/30/22Property40.73
301/11/2022RUBS - Trash - Trash For 09/01/22-09/30/22Property6.54
401/11/2022Tax - Tax For 09/01/22-09/30/22Property3.73
501/11/2022RUBS - Water and Sewer - Sewer For 09/01/22-09/30/22Property6.8
601/11/2022RUBS Fee - Service Fee For 11/01/22-11/30/22Property4.25
701/11/2022RUBS - Gas - Gas For 09/01/22-09/30/22Property8.05
801/11/2022RUBS - Electric - Electric For 09/01/22-09/30/22Property71.73
901/11/2022Monthly RUBS - Pest Control - Posted from 11/01/2022 to 11/30/2022 - RUBS - Pest ControlProperty5.12
1001/11/2022Monthly Valet Trash - Posted from 11/01/2022 to 11/30/2022 - Valet TrashProperty25.58
1101/11/2022RentProperty1084.38
1201/11/2022Monthly Facility Fee - Posted from 11/01/2022 to 11/30/2022 - Facility FeeProperty12.22
1301/11/2022Monthly Parcel - Posted from 11/01/2022 to 11/30/2022 - ParcelProperty2.05
1401/11/2022Credit - Valet Trash - Valet Trash Adjustment 11/2022Property-25.58
15
16
17Expected result by date
18you must put the same format as the dates in column A --->01/11/2022
19water40.73
20trash6.54
21tax3.73
22sewer6.8
23service fee4.25
24gas8.05
25electric71.73
26pest control5.12
27valet trash0
28rent1084.38
29facility fee12.22
30parcel2.05
311245.6
Sheet1
Cell Formulas
RangeFormula
C19:C30C19=SUM(($A$2:$A$14=$C$18)*( (ISNUMBER(SEARCH(B19&" for ",$B$2:$B$14))) + (ISNUMBER(SEARCH(B19&" - posted from ",$B$2:$B$14))) + (ISNUMBER(SEARCH(B19&" adjustment ",$B$2:$B$14))) + (IF(B19=$B$2:$B$14,1,0))) * ($D$2:$D$14))
C31C31=SUM(C19:C30)
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
@DanteAmor, very clever, thank you so much. I am not familiar with Array formulas.
Could you post a formula that does not require CTRL+SHIFT+ENTER?

With Thanks,
 
Upvote 0
I see that you have excel 2019, hopefully someone else will support us with a formula for that version and that does not require CSE 😁
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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