• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Increasing count by one for each row based on selection

I have a file attached. Select a day in C4. I am trying to construct a formula in column D.

Based on my current selection in C4, the values in column F is what I would like to get in column D.

Here is the idea. For any cell in column D, look to the left and check if the day is equal to or greater than the day selected in C4. If so, then the first value where this condition is true should be one, HOWEVER the next value below should be 2, then 3, then 4, etc. just like it says in column F.

I am having trouble finding a way to automatically increment the ROW function.
 

Attachments

I have a file attached. Select a day in C4. I am trying to construct a formula in column D.

Based on my current selection in C4, the values in column F is what I would like to get in column D.

Here is the idea. For any cell in column D, look to the left and check if the day is equal to or greater than the day selected in C4. If so, then the first value where this condition is true should be one, HOWEVER the next value below should be 2, then 3, then 4, etc. just like it says in column F.

I am having trouble finding a way to automatically increment the ROW function.

I just figured it out! In cell D12 I have the following formula:

=IF(C12>=$C$4,ROWS(C12:C12)+D11,D11)

In the data validation in C4, I also removed 0 as a possible selection, so that 1 is the first possible choice.
 
Hi ,

It is good that you have found a solution , but aren't you complicating matters by using the ROW function ? Can we not get the same results with this :

=IF(C12<$C$4,"",C12-$C$4+1)

entered in D12 , and copied down ?

Narayan
 
Back
Top