Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Making ranges adjust automatically

I desperately need some help with varying a range in a function. I'm trying
to make some of my reports more automated, and I would like to be able to
fill out one reference cell with the current month and have the formulas now
include any new data into their calculations. I can't simply use yearly
totals as I often want to compare the same time period last year to the
current YTD.

For example, if January's data is in cell C4 and I want to add the current
YTD I'd like to be able to write a formula that is SUM(C4:C("current month")).


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Making ranges adjust automatically

You've posted this question several times and have several answers that you
haven't responded to. Whats' wrong with those answers?

"Nelson B." wrote:

I desperately need some help with varying a range in a function. I'm trying
to make some of my reports more automated, and I would like to be able to
fill out one reference cell with the current month and have the formulas now
include any new data into their calculations. I can't simply use yearly
totals as I often want to compare the same time period last year to the
current YTD.

For example, if January's data is in cell C4 and I want to add the current
YTD I'd like to be able to write a formula that is SUM(C4:C("current month")).


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Making ranges adjust automatically

I haven't been able to get those answers to work. The answer from JMay works
for me in some situations, but I'm unclear on the variables in the address
formula, and can't seem to adjust them to suit my needs. His answer is below:

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,



I did actually reply to his post and did not receive an answer. I've since
figured out the replied question, but still cannot get the solution to work
for me consistently. So I thought I'd re-post and try again. I had no idea
it would upset you so greatly.

"Mike H" wrote:

You've posted this question several times and have several answers that you
haven't responded to. Whats' wrong with those answers?

"Nelson B." wrote:

I desperately need some help with varying a range in a function. I'm trying
to make some of my reports more automated, and I would like to be able to
fill out one reference cell with the current month and have the formulas now
include any new data into their calculations. I can't simply use yearly
totals as I often want to compare the same time period last year to the
current YTD.

For example, if January's data is in cell C4 and I want to add the current
YTD I'd like to be able to write a formula that is SUM(C4:C("current month")).


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Making ranges adjust automatically

Nelson,

For example, if January's data is in cell C4 and I want to add the current
YTD I'd like to be able to write a formula that is SUM(C4:C("current month")).


=SUM(OFFSET(C4,0,0,MONTH(TODAY()),1))

HTH,
Bernie
MS Excel MVP


"Nelson B." wrote in message
...
I desperately need some help with varying a range in a function. I'm trying
to make some of my reports more automated, and I would like to be able to
fill out one reference cell with the current month and have the formulas now
include any new data into their calculations. I can't simply use yearly
totals as I often want to compare the same time period last year to the
current YTD.





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
How: automatically re-adjust number series Josh W Excel Discussion (Misc queries) 6 May 11th 08 06:53 PM
Adjust row height automatically Jinghui Excel Discussion (Misc queries) 0 May 8th 08 03:23 AM
automatically adjust charts Ravens Fan Charts and Charting in Excel 6 December 3rd 07 06:40 PM
adjust automatically size margins bebert Excel Discussion (Misc queries) 0 February 26th 06 11:10 PM
making cells adjust kih305 Excel Discussion (Misc queries) 1 December 9th 04 11:43 PM


All times are GMT +1. The time now is 11:18 AM.

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

About Us

"It's about Microsoft Excel"