IF formula syntax

Dhinakaran

New Member
Joined
Mar 30, 2016
Messages
48
Office Version
  1. 365
  2. 2021
  3. 2016
Platform
  1. Windows
Hi All,

I've a set of data in which i need to identify my customer status if he's transacted back after a given specific date.

For instance, below is the sample customer data with their transacted dates in column B. Now, I need to identify how many customer have transacted back after 31-Jul-2022 basis the last transacted date.

A B C
Name Transacted Date Current Status
Customer 1 13-Jun-21
Customer 2 16-Jun-22
Customer 3 13-Jun-21
Customer 4 5-May-22
Customer 5 10-May-22
Customer 6 5-May-22
Customer 7 10-May-22
Customer 8 15-Aug-22
Customer 9 5-May-22
Customer 10 5-May-22
Customer 11 10-May-22
Customer 12 15-Aug-22
Customer 13 10-May-22
Customer 14 15-Aug-22
Customer 1 5-May-22
Customer 12 2-Jan-23
Customer 3 15-Jan-23
Customer 4 5-May-22
Customer 8 21-Nov-22
Customer 12 2-Dec-22

TIA.
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
not sure i understand the term
customer have transacted back after 31-Jul-2022

can you give some expected results ?

you only have a few customers with more than 1 entry
so are you asking simple
how many customers - UNIQUE() have an entry which is later than 31st july 22

a countifs() may help
or a unique filter

but as i say - i dont know what you are after

you have 3 versions of excel - 365 has a lot of useful functions like unique() etc
so would a solution in 365 version work ok
 
Upvote 0
Thanks ETAF. Yes would need to know how many customers - UNIQUE() have an entry which is later than 31st july 22.

OR

Let me put it this way. If you see, Customer 12, Customer 8, Customer 3, Customer 14 have come back and transacted post 31-Jul-2022.

Ideally in column C (Current status), For the above set of customer the status should be either True or Transacted if they has transacted back after 31-Jul-2022.

Using Office 365 now.
 
Upvote 0
i'm assuming you need to flag each entry - not just a list or filter in a cell

does this work for you
=IF(COUNTIFS($A$2:$A$21,A2,$B$2:$B$21,">"&DATEVALUE("31/7/22")),"transacted after 31-july-22","")

will give the text
"transacted after 31-july-22"
on all the customer entries - where at least 1 is after the 31/jul/22

Book25
ABC
1NameDateCurrent
2Customer 113-Jun-21 
3Customer 216-Jun-22 
4Customer 313-Jun-21transacted after 31-july-22
5Customer 45-May-22 
6Customer 510-May-22 
7Customer 65-May-22 
8Customer 710-May-22 
9Customer 815-Aug-22transacted after 31-july-22
10Customer 95-May-22 
11Customer 105-May-22 
12Customer 1110-May-22 
13Customer 1215-Aug-22transacted after 31-july-22
14Customer 1310-May-22 
15Customer 1415-Aug-22transacted after 31-july-22
16Customer 15-May-22 
17Customer 122-Jan-23transacted after 31-july-22
18Customer 315-Jan-23transacted after 31-july-22
19Customer 45-May-22 
20Customer 821-Nov-22transacted after 31-july-22
21Customer 122-Dec-22transacted after 31-july-22
Sheet1
Cell Formulas
RangeFormula
C2:C21C2=IF(COUNTIFS($A$2:$A$21,A2,$B$2:$B$21,">"&DATEVALUE("31/7/22")),"transacted after 31-july-22","")


or if you need a list
=TEXTJOIN(", ",,UNIQUE(FILTER(A2:A21,B2:B21>DATEVALUE("31/7/22"))))

Book25
ABCDEFG
1NameDateCurrent
2Customer 113-Jun-21 Customer 8, Customer 12, Customer 14, Customer 3
3Customer 216-Jun-22 
4Customer 313-Jun-21transacted after 31-july-22
5Customer 45-May-22 
6Customer 510-May-22 
7Customer 65-May-22 
8Customer 710-May-22 
9Customer 815-Aug-22transacted after 31-july-22x
10Customer 95-May-22 Customer 12, Customer 8, Customer 3, Customer 14
11Customer 105-May-22 31-Jul-2022.
12Customer 1110-May-22 
13Customer 1215-Aug-22transacted after 31-july-22x
14Customer 1310-May-22 
15Customer 1415-Aug-22transacted after 31-july-22x
16Customer 15-May-22 
17Customer 122-Jan-23transacted after 31-july-22
18Customer 315-Jan-23transacted after 31-july-22x
19Customer 45-May-22 
20Customer 821-Nov-22transacted after 31-july-22
21Customer 122-Dec-22transacted after 31-july-22
Sheet1
Cell Formulas
RangeFormula
G2G2=TEXTJOIN(", ",,UNIQUE(FILTER(A2:A21,B2:B21>DATEVALUE("31/7/22"))))
C2:C21C2=IF(COUNTIFS($A$2:$A$21,A2,$B$2:$B$21,">"&DATEVALUE("31/7/22")),"transacted after 31-july-22","")
 
Upvote 0
Solution

Forum statistics

Threads
1,214,936
Messages
6,122,340
Members
449,079
Latest member
rocketslinger

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