Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using Variables in the sum() function

I export Quickbook reports to Excel spreadsheets they are of various
nnumber of columns and various number of rows. I want to use macros with
variables in the =sum() functions rather than the hard cell address. Is this
possible and if so how do I do it?

Thanks

Roy Korb


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 205
Default Using Variables in the sum() function

Hello Roy,

You need to use "Named Ranges". Take a look at Chip Pearson's article:

http://www.cpearson.com/excel/named.htm

Best regards

John



"Roy Korb" wrote in message
...
I export Quickbook reports to Excel spreadsheets they are of various
nnumber of columns and various number of rows. I want to use macros with
variables in the =sum() functions rather than the hard cell address. Is
this possible and if so how do I do it?

Thanks

Roy Korb



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Using Variables in the sum() function

Use a dynamic range

=SUM(OFFSET($A$2,,,COUNTA($A:$A)-1,COUNTA($2:$2))

will sum from A2 across and down.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Roy Korb" wrote in message
...
I export Quickbook reports to Excel spreadsheets they are of various
nnumber of columns and various number of rows. I want to use macros with
variables in the =sum() functions rather than the hard cell address. Is

this
possible and if so how do I do it?

Thanks

Roy Korb




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
using =IF function with 12 variables swell estimator[_2_] Excel Discussion (Misc queries) 4 September 8th 08 12:09 AM
COUNTIF Function with variables TJ Excel Worksheet Functions 6 September 5th 08 03:16 AM
DDE function with variables Toledo Excel Worksheet Functions 0 November 30th 07 06:12 AM
VBA passing variables through a function Jeff Excel Discussion (Misc queries) 2 November 3rd 05 11:23 PM
Function variables Todd Huttenstine Excel Programming 7 April 28th 04 08:39 PM


All times are GMT +1. The time now is 01:52 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"