ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Fairly Simple Macro HELP! (https://www.excelbanter.com/excel-programming/429932-fairly-simple-macro-help.html)

Lost

Fairly Simple Macro HELP!
 
I need a macro that does the following:

Each row consists of an item (therefore the number of rows will vary), I
need to drag a formula down a column (dragged down depending on the number of
items are entered in) through the last item. Then I need a sum on those
totals.

Please help! Thanks!



Mike H

Fairly Simple Macro HELP!
 
Hi,

I think you right it probably is a 'simple macro' if a macro is even
necessary but I'm afraid I don't understand the question

Each row consists of an item (therefore the number of rows will vary),


Please explain the above a bit more clearly and perhaps a small sample of
data with the answer you expect.

Mike

"Lost" wrote:

I need a macro that does the following:

Each row consists of an item (therefore the number of rows will vary), I
need to drag a formula down a column (dragged down depending on the number of
items are entered in) through the last item. Then I need a sum on those
totals.

Please help! Thanks!



Rick Rothstein

Fairly Simple Macro HELP!
 
I need to drag a formula down a column

Besides Mike's question, tell us the formula you need to drag down so we can
show you how to construct it in code (and make sure to tell us which, if
any, references are absolute).

--
Rick (MVP - Excel)


Patrick Molloy

Fairly Simple Macro HELP!
 
if your data is in column C and the first formula is in D1
then you could use

Range("D1").AutoFill Destination:=Range(Range("C1"),
Range("C1").End(xlDown)).Offset(, 1)
Range("D1").End(xlDown).Offset(1).FormulaR1C1 = "=SUM(R1C:R[-1]C)"


"Lost" wrote in message
...
I need a macro that does the following:

Each row consists of an item (therefore the number of rows will vary), I
need to drag a formula down a column (dragged down depending on the number
of
items are entered in) through the last item. Then I need a sum on those
totals.

Please help! Thanks!




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

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