ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   macro to copy a function down a list (https://www.excelbanter.com/excel-programming/383124-re-macro-copy-function-down-list.html)

Don Guillett

macro to copy a function down a list
 
Sub copyformuladown()
lr = Cells(Rows.Count, "a").End(xlUp).Row
Range("b2:b" & lr).FillDown
End Sub

--
Don Guillett
SalesAid Software

"steven" wrote in message
...
Hi,

this should be fairly easy. I'd like a macro that copies a function (any
function for example a vlookup() function) down in a list. So lets say I
have
a list of data and I insert a column (column A), then i put a function (or
anything for that mater) in cell A2 and I want it copied down to lets say
cell A2000.

I want this function to work in any list though no matter how many rows it
has. It has to somehow "see" the where the data rows end in the cells next
to
column A, and just copy up to there.

Also column B and C might also be blank and the list might start from
column
D for example.

Hope that makes sence. Thank you

Steven.





All times are GMT +1. The time now is 01:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com