Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help with variable ranges

I need some help making some of my reports more automated. What I'm trying
to accomplish is being able to fill in a reference cell for the current
month, and have ranges in varying functions adjust to include the new month.
This way I can enter the new data and not worry about having to go and adjust
every formula to include it. For example, if January's data is in cell C4
and I want to sum the data for January thru August I'd like to be able to
write the formula to SUM(C4:C("current month")). I've tried doing this
various ways, but have been unsuccessful.

Thanks for any suggestions.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Help with variable ranges

This article from Jon Peltier should help get you started. It applies to
dynamic charting, but the concept is the same.

http://pubs.logicalexpressions.com/P...cle.asp?ID=246
--
HTH,
Barb Reinhardt



"Nelson B." wrote:

I need some help making some of my reports more automated. What I'm trying
to accomplish is being able to fill in a reference cell for the current
month, and have ranges in varying functions adjust to include the new month.
This way I can enter the new data and not worry about having to go and adjust
every formula to include it. For example, if January's data is in cell C4
and I want to sum the data for January thru August I'd like to be able to
write the formula to SUM(C4:C("current month")). I've tried doing this
various ways, but have been unsuccessful.

Thanks for any suggestions.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 468
Default Help with variable ranges

Sample:
A1 = 3 << Your Variable (months or columns to stretch out to)

B3 = 123
C3 = 456
D3 = 789

formula in cell A3

=SUM(B3:INDIRECT(ADDRESS(3,A1+1,4)))

HTH,




"Nelson B." wrote:

I need some help making some of my reports more automated. What I'm trying
to accomplish is being able to fill in a reference cell for the current
month, and have ranges in varying functions adjust to include the new month.
This way I can enter the new data and not worry about having to go and adjust
every formula to include it. For example, if January's data is in cell C4
and I want to sum the data for January thru August I'd like to be able to
write the formula to SUM(C4:C("current month")). I've tried doing this
various ways, but have been unsuccessful.

Thanks for any suggestions.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 468
Default Help with variable ranges

Better alter cell A1 below to $A$1

=SUM(B3:INDIRECT(ADDRESS(3,A1+1,4)))
to
=SUM(B3:INDIRECT(ADDRESS(3,$A$1+1,4)))

so when you copy the formula down it works !!


"JMay" wrote:

Sample:
A1 = 3 << Your Variable (months or columns to stretch out to)

B3 = 123
C3 = 456
D3 = 789

formula in cell A3

=SUM(B3:INDIRECT(ADDRESS(3,A1+1,4)))

HTH,




"Nelson B." wrote:

I need some help making some of my reports more automated. What I'm trying
to accomplish is being able to fill in a reference cell for the current
month, and have ranges in varying functions adjust to include the new month.
This way I can enter the new data and not worry about having to go and adjust
every formula to include it. For example, if January's data is in cell C4
and I want to sum the data for January thru August I'd like to be able to
write the formula to SUM(C4:C("current month")). I've tried doing this
various ways, but have been unsuccessful.

Thanks for any suggestions.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Help with variable ranges

How do I do this for vertical data in the range?

"JMay" wrote:

Better alter cell A1 below to $A$1

=SUM(B3:INDIRECT(ADDRESS(3,A1+1,4)))
to
=SUM(B3:INDIRECT(ADDRESS(3,$A$1+1,4)))

so when you copy the formula down it works !!


"JMay" wrote:

Sample:
A1 = 3 << Your Variable (months or columns to stretch out to)

B3 = 123
C3 = 456
D3 = 789

formula in cell A3

=SUM(B3:INDIRECT(ADDRESS(3,A1+1,4)))

HTH,




"Nelson B." wrote:

I need some help making some of my reports more automated. What I'm trying
to accomplish is being able to fill in a reference cell for the current
month, and have ranges in varying functions adjust to include the new month.
This way I can enter the new data and not worry about having to go and adjust
every formula to include it. For example, if January's data is in cell C4
and I want to sum the data for January thru August I'd like to be able to
write the formula to SUM(C4:C("current month")). I've tried doing this
various ways, but have been unsuccessful.

Thanks for any suggestions.

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
Named ranges scope / workbook/worksheet level named ranges- changeswith variable use... christian_spaceman Excel Programming 3 December 24th 07 01:15 PM
Variable ranges igorek Excel Programming 5 November 17th 06 12:17 AM
Counting variable ranges and auto-summing variable ranges Father Guido[_5_] Excel Programming 2 March 29th 06 04:07 AM
Variable ranges John Contact Excel Worksheet Functions 1 June 17th 05 08:02 AM
Sum Variable Ranges Erika Excel Worksheet Functions 6 December 23rd 04 03:52 PM


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