A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Macro: Insert formula for each row of data



 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old August 18th, 2011, 01:11 AM
Jeff Monroe Jeff Monroe is offline
Member
 
First recorded activity by OfficeFrustration: May 2006
Location: San Diego, CA
Posts: 27
Default 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.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:08 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.