How to search in a table with multiple dates and criteria in Excel

Copper Contributor

Hi. Good day everyone.

 I am having a problem to like to automatically check if I already have paid a utility bills in its due date on my Budget table.

Have to Table one for my credit debit transactions and another for utility with due date and payments, on my 1st table see illustration below assuming date today is 2/2/2020.

1st table

DATE.             IF PAID     Description

1/2/2020           /           Water Bills

1/4/2020           /           Electric Bill

1/31/2020         /           Water Bill

2/2/2020                       Electric Bill

 

2nd table Note 1 is for if paid, blank is not yet paid

Description    Due date             Jan    Feb   Mar

Water Bill       2/3/2020               1       1

Electric Bill     2/5/2020               1

 

so I want to make it like automatic to put 1 in Electric Bill for the month of Feb if I already paid for it likewise for Mar and so on. Can anyone help me to create its formula?

 

 

2 Replies

@Melchzedeck 

That could be like

=IF( SUMPRODUCT(
  (MONTH(<DATE column>)=<month>)*
  NOT(ISBLANK(<IF PAID column>))*
  (<DESCRIPTION column>=<Description value in row>)
  ),1,"")

assuming all dated are in one year. Otherwise instead of Jan, Feb, etc. is to use any date within the month formatted as mmm, and SUMIFS similar to above using EOMONTH to check if paid data is within the month.

Perhaps on sample file it'll be easier to explain.

@Sergei Baklan 

 

Thank you and it did well but my other issue is that at my example even though my due date is on Feb but I paid it before and the date is Jan.31 so I kind of looking like within its due date range from DUE DATE -10 to DUE DATE +10

EX to add in formula

=IF ( AND (  DUEDATE - 10 >= DATE, DUEDATE +5 <= DATE),1,"")