Solved

Change count to Sum

Posted on 2011-02-25
4
266 Views
Last Modified: 2012-06-27
Hi i have the following lines of code that counts Columns+Rows.

Can i change this to sum?

rngYesterday.Columns.Count
rngYesterday.Rows.Coun

Thanks
Seamust
0
Comment
Question by:Seamus2626
  • 2
4 Comments
 
LVL 45

Accepted Solution

by:
patrickab earned 500 total points
ID: 34981899
Try:

worksheetfunction.Sum(rngYesterday)
0
 
LVL 18

Expert Comment

by:Cory Vandenberg
ID: 34982689
Can you elaborate what you are trying to sum?  The values in the columns and rows, by columns separately, by rows separately, or sum the # of Columns and # of Rows?

Your question is a little vague.
0
 

Author Closing Comment

by:Seamus2626
ID: 34995659
Perfect, thats done the trick.

Thanks Patrick
0
 
LVL 45

Expert Comment

by:patrickab
ID: 34995807
Seamus2626 - Thanks for thegrade - Patrick
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delete all words in cell more than 5 words 7 47
Help with Adding text from a form to a worksheet 5 37
Boolean help 6 27
excel connection properties parameters grayed out 5 25
Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now