I have a question about Excel. I hope someone can help me out here because I'm not much of an expert in Excel. This is what I'm trying to do:
I am keeping track of some login data for different markets in my organization. In one of my Excel sheets, I have stored the number of logins per market (rows) per day (columns). Every day I run a macro that adds today's login data to today's column. Now I want to create an overview that shows the number of days since the last login for each market. In order to do that, I need an Excel formula that counts the number of subsequent zero values in a market row, over a series of columns ranging from today's date column and back.
An example to make clear what I mean. Suppose this is the login data from 01/08/2018, 01/09/2018 and 01/10/2018 (today):
USA: 16,23,0
Netherlands: 0,0,2
Spain: 8,0,0
Then the number of days since last login for USA should be 1. For Netherlands it should be 0 and for Spain it should be 2. If tomorrow, someone from Spain would login again, the sequence would become 8,0,0,1. Then the formula should return 0 again.
Now my question is: How can I do this? I know I will need to add the following statements to my formula:
- A VLOOKUP, HLOOKUP combination to find the right market and date combination to start counting from
- A TODAY() statement within the HLOOKUP to make sure it always starts counting from today's date
- A (combination of) IF statements that determines whether to count or not (IF cell = 0).
- Some COUNT statement to determine the total number of subsequent 0's
However, I have no idea how to put it together. I hope you do :)
Aucun commentaire:
Enregistrer un commentaire