Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Copy Formula Down

I have the following user form code to add data to a worksheet:

Dim LastRow As Object

Set LastRow = Worksheets("Raw
Material").Range("b5000").End(xlUp)

LastRow.Offset(1, 0).Value = TextBox5.Text
LastRow.Offset(1, 2).Value = TextBox1.Text
LastRow.Offset(1, 5).Value = ComboBox2.Text

On the worksheet I have formulas in cells referring to the cells where I add
data. These formulas will have to be filled all the way down the worksheet
in anticipation of new entries. Instead of filling all these formulas down
the sheet, is it possible to add code to what I use when I add data that
will fill formulas down?

GK



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Copy Formula Down

LastRow.Offset(1,3).Resize(1,2).Filldown


assuming the last filled row has the formulas

--
Regards,
Tom Ogilvy

"gregork" wrote in message
...
I have the following user form code to add data to a worksheet:

Dim LastRow As Object

Set LastRow = Worksheets("Raw
Material").Range("b5000").End(xlUp)

LastRow.Offset(1, 0).Value = TextBox5.Text
LastRow.Offset(1, 2).Value = TextBox1.Text
LastRow.Offset(1, 5).Value = ComboBox2.Text

On the worksheet I have formulas in cells referring to the cells where I

add
data. These formulas will have to be filled all the way down the worksheet
in anticipation of new entries. Instead of filling all these formulas down
the sheet, is it possible to add code to what I use when I add data that
will fill formulas down?

GK





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Copy Formula Down

Great, thanks Tom, that will tidy my sheet up.......I really didn't like
having formulas filled all the way down my columns.

cheers
GK

"Tom Ogilvy" wrote in message
...
LastRow.Offset(1,3).Resize(1,2).Filldown


assuming the last filled row has the formulas

--
Regards,
Tom Ogilvy

"gregork" wrote in message
...
I have the following user form code to add data to a worksheet:

Dim LastRow As Object

Set LastRow = Worksheets("Raw
Material").Range("b5000").End(xlUp)

LastRow.Offset(1, 0).Value = TextBox5.Text
LastRow.Offset(1, 2).Value = TextBox1.Text
LastRow.Offset(1, 5).Value = ComboBox2.Text

On the worksheet I have formulas in cells referring to the cells where I

add
data. These formulas will have to be filled all the way down the

worksheet
in anticipation of new entries. Instead of filling all these formulas

down
the sheet, is it possible to add code to what I use when I add data that
will fill formulas down?

GK







  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Copy Formula Down

Tom I'm hoping you're following this thread as I was wondering if it is
possible to fill down the cell format as well as formula with code?

regards
GK


"Tom Ogilvy" wrote in message
...
LastRow.Offset(1,3).Resize(1,2).Filldown


assuming the last filled row has the formulas

--
Regards,
Tom Ogilvy

"gregork" wrote in message
...
I have the following user form code to add data to a worksheet:

Dim LastRow As Object

Set LastRow = Worksheets("Raw
Material").Range("b5000").End(xlUp)

LastRow.Offset(1, 0).Value = TextBox5.Text
LastRow.Offset(1, 2).Value = TextBox1.Text
LastRow.Offset(1, 5).Value = ComboBox2.Text

On the worksheet I have formulas in cells referring to the cells where I

add
data. These formulas will have to be filled all the way down the

worksheet
in anticipation of new entries. Instead of filling all these formulas

down
the sheet, is it possible to add code to what I use when I add data that
will fill formulas down?

GK







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Copy Formula Down

the code did fill down the format for me.

--
Regards,
Tom Ogilvy

"gregork" wrote in message
...
Tom I'm hoping you're following this thread as I was wondering if it is
possible to fill down the cell format as well as formula with code?

regards
GK


"Tom Ogilvy" wrote in message
...
LastRow.Offset(1,3).Resize(1,2).Filldown


assuming the last filled row has the formulas

--
Regards,
Tom Ogilvy

"gregork" wrote in message
...
I have the following user form code to add data to a worksheet:

Dim LastRow As Object

Set LastRow = Worksheets("Raw
Material").Range("b5000").End(xlUp)

LastRow.Offset(1, 0).Value = TextBox5.Text
LastRow.Offset(1, 2).Value = TextBox1.Text
LastRow.Offset(1, 5).Value = ComboBox2.Text

On the worksheet I have formulas in cells referring to the cells where

I
add
data. These formulas will have to be filled all the way down the

worksheet
in anticipation of new entries. Instead of filling all these formulas

down
the sheet, is it possible to add code to what I use when I add data

that
will fill formulas down?

GK









Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy formula result (text) only - without copying formula Mulberry Excel Discussion (Misc queries) 2 October 2nd 08 09:51 AM
I copy a formula and the results copy from the original cell brooklynsd Excel Discussion (Misc queries) 1 June 23rd 07 01:35 AM
copy formula down a column and have cell references change within formula brad New Users to Excel 5 May 13th 07 04:38 PM
Copy/Paste how to avoid the copy of formula cells w/o calc values Dennis Excel Discussion (Misc queries) 10 March 2nd 06 10:47 PM
Copy formula so destination displays formula as text Omunene Excel Discussion (Misc queries) 2 September 30th 05 06:28 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"