I am encountering something I am finding challanging to understand how to script and I was hoping maybe someone who has better excel knowledge may be able to help!
UserID is in column A, and DateofTransaction Is in column I, I have a code that identifies any change between user id or Month as a 1 else 0. : ENTERED INTO COLUMN O =IF(A2<>A1,1,IF(I2<>I1,1,0))
if the ids are Not the same then 1, if the ids are the same then it checks if the months are not the same then 1 too, if both are satisfied then a 0.
Then to try to create some logic where it can group each set I have written Column O is the =IF(O2+O3=2,1,IF(O2=0,IF(O3=1,2,IF(O2+O3=0,Q1+1,null))))
Which just identifies the groups of months but unsuccessfully at the moment, What I am looking for is Blank cells if it is not the only one in the month for the user. example excel below
-*ColumnA.....Column I...Column O....Column Q
-*user id, date , 0 or 1match, transactions per month,
-*1 , Mar-16, 1 , 1
-*1 , Apr-16, 1,BLANK
-*1 , Apr-16 , 0 , 2
-*1 , Aug-16 , 1 , 1
-*2 , Aug-16 , 1, BLANK
-*2 , Aug-16 , 0, BLANK
-*2 , Aug-16, 0, BLANK
-*2 , Aug-16 , 0, 4
I will then need to do an Average transactions per month for each user over their lifetime individually.
Any suggestions would be greatly appreciated!
Thanks, C
Aucun commentaire:
Enregistrer un commentaire