Wednesday, January 6, 2010

How would you write an ';IF'; formula for: if the cell value is greater than 30 then restart numbering at 1?

Just use actual dates. Seriously.





But if You want to assume every month has 30 days,





A1 = n %26lt;-- whatever number you start with


A2 = if(A1+7%26gt;30,A1-23,A1+7) %26lt;-- copy this cell downHow would you write an ';IF'; formula for: if the cell value is greater than 30 then restart numbering at 1?
Or for Visual Basic:





Dim iNum as Integer


If cell.value %26gt; 30 then iNum = 1





....but I'm not sure what you mean by an ';IF'; formula. I guess it could mean many things. I'm a VB Programmer so that's what I think when I hear an ';IF formula'; or ';IF Statement';How would you write an ';IF'; formula for: if the cell value is greater than 30 then restart numbering at 1?
if(';cell value';%26gt;30){


numbering=1;


}

No comments:

Post a Comment