Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How can I enter a formula into cell E2 and then fill the formula down to the
last row with data on the sheet. For example: enter into E2: =IF(D20,TODAY()-(D2+30)," ") Fill into E3: =IF(D30,TODAY()-(D3+30)," ") ....Fill to last Row on sheet with data in column D. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Josh,
Range("E2:E" & Range("D65536").End(xlUp).Row).FormulaR1C1 = _ "=IF(RC[-1]0,TODAY()-(RC[-1]+30),"" "")" HTH, Bernie MS Excel MVP "Josh O." wrote in message ... How can I enter a formula into cell E2 and then fill the formula down to the last row with data on the sheet. For example: enter into E2: =IF(D20,TODAY()-(D2+30)," ") Fill into E3: =IF(D30,TODAY()-(D3+30)," ") ...Fill to last Row on sheet with data in column D. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Bernie.
How about the same thing with a different formula put into column "o"? =if(g20,sum(h2:n2)," ") "Bernie Deitrick" wrote: Josh, Range("E2:E" & Range("D65536").End(xlUp).Row).FormulaR1C1 = _ "=IF(RC[-1]0,TODAY()-(RC[-1]+30),"" "")" HTH, Bernie MS Excel MVP "Josh O." wrote in message ... How can I enter a formula into cell E2 and then fill the formula down to the last row with data on the sheet. For example: enter into E2: =IF(D20,TODAY()-(D2+30)," ") Fill into E3: =IF(D30,TODAY()-(D3+30)," ") ...Fill to last Row on sheet with data in column D. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Josh,
Range("O2:O" & Range("G65536").End(xlUp).Row).FormulaR1C1 = _ "=IF(RC[-8]0,SUM(RC[-7]:RC[-1]),"" "")" This will extend down column O to match the values in column G. HTH, Bernie MS Excel MVP "Josh O." wrote in message ... Thanks Bernie. How about the same thing with a different formula put into column "o"? =if(g20,sum(h2:n2)," ") "Bernie Deitrick" wrote: Josh, Range("E2:E" & Range("D65536").End(xlUp).Row).FormulaR1C1 = _ "=IF(RC[-1]0,TODAY()-(RC[-1]+30),"" "")" HTH, Bernie MS Excel MVP "Josh O." wrote in message ... How can I enter a formula into cell E2 and then fill the formula down to the last row with data on the sheet. For example: enter into E2: =IF(D20,TODAY()-(D2+30)," ") Fill into E3: =IF(D30,TODAY()-(D3+30)," ") ...Fill to last Row on sheet with data in column D. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Bernie. I had tried a similiar code, but it keep hanging up at the
formula. Works perfect! "Bernie Deitrick" wrote: Josh, Range("O2:O" & Range("G65536").End(xlUp).Row).FormulaR1C1 = _ "=IF(RC[-8]0,SUM(RC[-7]:RC[-1]),"" "")" This will extend down column O to match the values in column G. HTH, Bernie MS Excel MVP "Josh O." wrote in message ... Thanks Bernie. How about the same thing with a different formula put into column "o"? =if(g20,sum(h2:n2)," ") "Bernie Deitrick" wrote: Josh, Range("E2:E" & Range("D65536").End(xlUp).Row).FormulaR1C1 = _ "=IF(RC[-1]0,TODAY()-(RC[-1]+30),"" "")" HTH, Bernie MS Excel MVP "Josh O." wrote in message ... How can I enter a formula into cell E2 and then fill the formula down to the last row with data on the sheet. For example: enter into E2: =IF(D20,TODAY()-(D2+30)," ") Fill into E3: =IF(D30,TODAY()-(D3+30)," ") ...Fill to last Row on sheet with data in column D. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Josh,
The easiest way to get the formula correct is to enter the formula into a cell, and get it working. Then select the cell turn on the macro recorder, press F2, press Enter, then turn off the recorder. You will then get the correct code-to-formula syntax. HTH, Bernie MS Excel MVP Thanks Bernie. I had tried a similiar code, but it keep hanging up at the formula. Works perfect! |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This post is absolutely awesome, I was having no luck finding a solution to
this problem! Out of curiosity, what is the significance of the 65536? "Bernie Deitrick" wrote: Range("E2:E" & Range("D65536").End(xlUp).Row).FormulaR1C1 = _ "=IF(RC[-1]0,TODAY()-(RC[-1]+30),"" "")" |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Out of curiosity, what is the significance of the 65536?
That is the last row in the worksheet, = 2^16. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "J Cope At Stratis" wrote in message ... This post is absolutely awesome, I was having no luck finding a solution to this problem! Out of curiosity, what is the significance of the 65536? "Bernie Deitrick" wrote: Range("E2:E" & Range("D65536").End(xlUp).Row).FormulaR1C1 = _ "=IF(RC[-1]0,TODAY()-(RC[-1]+30),"" "")" |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
My worksheet automatically adds a fill color when I enter text. | Excel Discussion (Misc queries) | |||
Enter a value in wks1-Find that value on wks2-Auto fill cells in w | Excel Worksheet Functions | |||
i want cells to auto fill with colour when i enter a number | Excel Discussion (Misc queries) | |||
What does hitting Ctrl + Shift + Enter to enter a formula do??? Help a n00b out. | Excel Worksheet Functions | |||
Enter last name, auto fill full name & address--HOW? | Excel Discussion (Misc queries) |