Constant Constant in Excel Formula

Suppose in Excel I have the formula =$C$8+1 , what should I add to 1 so that when dragging it it becomes $C$8+2 ?

Can this be done?

Below is my actual formula. I want to increase 1 to 2 so that it becomes = 2

 IF((NOW()-$C8)=1,"1","0") 
+6
source share
1 answer

Well .. there may be several ways to do this, but the only thing on my head is to use the =ROW() function.

Say you start the formula on line 5.

=IF((NOW()-$C8)=ROW()-4,"1","0")

The = ROW () will return the line number that you are currently (i.e. 5, in this case). Thus, in the first line we will have = 1 (from 5-4), and then = 2 (6-4), etc.

However, it looks like you are comparing dates, right? I would say that you need to truncate the values ​​in order to have a comparison of the days between them ...

=IF((TRUNC(NOW())-TRUNC($C8))=ROW()-4,"1","0")

Hope this helps ... or at least give you a way to choose your solution.

+9
source

Source: https://habr.com/ru/post/894037/


All Articles