Forum Discussion
Excel Formula Question
Can someone help. I'm trying to figure out how to count how many days between a certain number was used. Example the number 3 was used on December 1st, 2019 and again on March 12, 2020. I'm trying to put a formula that way it will tell me the amount of days between repetitive numbers through out the year or years. Any assistance would be greatly appreciated.
4 Replies
- devyadav2008Brass Contributor=countif(Range,cell)
Range= select cell which contains the no
cell = means select respective cell - Subodh_Tiwari_sktneerSilver Contributor
Considering the data in the following screenshot, maybe the formula given below will give you a starting point.
In C3
=IF(COUNTIF($A$2:A3,A3)=1,"",B3-MAX(INDEX((A$2:A2=A3)*(B$2:B2),)))Refer to the attached for more details.
- RUUP4IT101Copper Contributor
Subodh_Tiwari_sktneer I appreciate the help. I'm still having issues. I tried to modify the formula you sent me to see if I could get it to work, but to no avail it isn't. I'm attaching what I'm working on if you don't mind giving me some pointers I would greatly appreciate. I'm also putting the formula I tried to make here. Thank you again.
=IF(COUNTIF($B$3:$E$542):(B3:E542)B4:E4)=1,"",A3-MAX(INDEX((B$2:E$542,:B2=B3)*(A$3:A3),)))
- Subodh_Tiwari_sktneerSilver Contributor
Can you rephrase your requirement and explain what exactly you are trying to achieve considering the sample data? And can you please upload the sample data file along with the desired output mocked up manually for few rows explaining the logic behind that output on the sheet itself.