Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Formula Down
Tom 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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Formula Down
the code I provided did fill down the formatting for me.
-- Regards, Tom Ogilvy "gregork" wrote in message ... Tom 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Formula Down
Yes Tom your right but if I use your code on a cell with data in the cell
above it then the data is filled as well ...so my apologies for not explaining myself properly in my second post. What I need is code to fill formula and format (which you gave me) and code to fill format only which I will use on cells with data in the cells above. Many Thanks GK "Tom Ogilvy" wrote in message ... the code I provided did fill down the formatting for me. -- Regards, Tom Ogilvy "gregork" wrote in message ... Tom 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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy formula result (text) only - without copying formula | Excel Discussion (Misc queries) | |||
I copy a formula and the results copy from the original cell | Excel Discussion (Misc queries) | |||
copy formula down a column and have cell references change within formula | New Users to Excel | |||
Copy/Paste how to avoid the copy of formula cells w/o calc values | Excel Discussion (Misc queries) | |||
Copy formula so destination displays formula as text | Excel Discussion (Misc queries) |