Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
DB DB is offline
external usenet poster
 
Posts: 46
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default 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.

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
Write Macro to Fix Data Alignment (Data dump from Crystal to Excel Karin Excel Discussion (Misc queries) 2 September 22nd 09 05:31 PM
VBA and SQL dump changing the cell types in other worksheets Bob Excel Programming 5 May 3rd 06 04:07 PM
how do I automatically run a macro from the result of a cell Barrie Lewis Excel Programming 1 April 11th 06 12:12 PM
How to run a Macro depending on a result of a cell Darin Kramer Excel Programming 7 December 2nd 04 05:34 PM
Question: Cell formula or macro to write result of one cell to another cell Frederik Romanov Excel Programming 1 July 8th 03 03:03 PM


All times are GMT +1. The time now is 10:13 AM.

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

About Us

"It's about Microsoft Excel"