Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 12th, 2015, 08:42 AM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Feb 2015
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Autosum for dynamic Column

How can I change the code below to auto-sum a dynamic column, not just the part where it ended when I recorded the macro.


    ActiveCell.FormulaR1C1 = "=RC[-1]/60"
    Selection.NumberFormat = "0.00;[Red]0.00"
    Selection.AutoFill Destination:=Range("F1:F82"), Type:=xlFillDefault
    Selection.Font.Underline = xlUnderlineStyleSingle
    Selection.Font.Bold = True
    ActiveCell.FormulaR1C1 = "=SUM(R[-82]C:R[-1]C)"
I want to have the column summed and the sum to be placed on the next column just below the last value it detects, bolded.

Reply With Quote
  #2 (permalink)  
Old February 15th, 2015, 10:41 AM
Friend of Wrox
Points: 3,060, Level: 23
Points: 3,060, Level: 23 Points: 3,060, Level: 23 Points: 3,060, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Sep 2005
Location: , , .
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts


Can you try the WorksheetFunction.Sum in your VBA code

C# Code Snippets (http://www.dotnetdud.blogspot.com)

VBA Tips & Tricks (http://www.vbadud.blogspot.com)
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic column sorting victorcorey XSLT 1 October 31st, 2007 05:40 PM
Dynamic Table Column Headers elygp ASP.NET 1.0 and 1.1 Professional 2 May 8th, 2007 04:52 AM
Column Headers for Dynamic Table elygp ASP.NET 1.0 and 1.1 Basics 1 May 8th, 2007 02:43 AM
Dynamic table column sizing tomsi BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 February 1st, 2006 08:58 AM
help required in datagrid dynamic template column govind ASP.NET 1.x and 2.0 Application Design 2 January 4th, 2006 11:32 AM

All times are GMT -4. The time now is 06:03 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.