If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Macro: Insert formula for each row of data
I have a variable sized data set in a work sheet. Simplified it's like this:
A B 1 data1 =Today() 2 data2 =Today() 3 data3 =Today() (Column A lists rows of data, Column B I want to insert today's date for each row) I have a series of macros that reformat the worksheet dataset and I want to tack on the "Today's Date" formula for each record without going past the lastrow (of column A). The number of rows varies each time I import the record set. What I'm doing now is copying the formula (from Row 1) and pasting itinto a number of records I know exceeds the total of record rows imported. I then go back and delete those extra rows. (I do this for several other columns with different functions). I know there is a better way. Thanks. Jeff
__________________
jm Last edited by Jeff Monroe : August 18th, 2011 at 05:07 AM. |
#2
|
|||
|
|||
You could use something like:
Code:
=IF(A2="","",TODAY()) |
#3
|
|||
|
|||
Quote:
Tarquinos: That formula works. The only problem is there is now information in those cells. Because of that, those rows are included in any sorts I do (unless I filter out the blanks). This actually pushes some of my filled rows down to the last rows of 2000 (text comes after blanks). I would like to figure out how to do a loop based on how many records I have. Thanks.
__________________
jm |
Thread Tools | |
Display Modes | |
|
|