Dump macro result into cell
I currently am running a macro that sums the numerical values from a chain of
numbers and letters. What can I add to the macro to have the macro dump the sum from the chain into the cell immediately to its right? I'd like this to work for each cell in my column. |
Dump macro result into cell
One way:
Dim dSum As Double Dim rCell As Range With Sheets("Sheet1") For Each rCell in .Range("A1:A" _ .Range("A" & .Rows.Count).End(xlUp).Row) dSum = <your code here rCell.Offset(0, 1).Value = dSum Next rCell End With In article , DB wrote: I currently am running a macro that sums the numerical values from a chain of numbers and letters. What can I add to the macro to have the macro dump the sum from the chain into the cell immediately to its right? I'd like this to work for each cell in my column. |
All times are GMT +1. The time now is 02:30 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com