Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
sd
 
Posts: n/a
Default sum offset question

I need to sum a range based on the number on another cell
I use the following function to get that
=SUM(OFFSET(J45,0,0,L12)) (basically summing J45 thru J49 since cell L12
contains value 5)
I gives me the correct result from above formula when summing across rows.

However when I change that formula to sum across columns and changing the
same formula to
=SUM(OFFSET(J45,0,0,0,L12))
to sum across columns it gives me a result #REF!

What would be the correct formula to sum across columns.



  #2   Report Post  
Jason Morin
 
Posts: n/a
Default

#REF! means that the range is beyond the worksheet. In
which cell is your formula located? For example, if it
were in IV1 and L12 = 5, you'll receive an error because
there are no more columns beyond column IV.

The error can also be caused if you delete rows and/or
columns that the formula is referencing.

HTH
Jason
Atlanta, GA

-----Original Message-----
I need to sum a range based on the number on another cell
I use the following function to get that
=SUM(OFFSET(J45,0,0,L12)) (basically summing J45 thru

J49 since cell L12
contains value 5)
I gives me the correct result from above formula when

summing across rows.

However when I change that formula to sum across columns

and changing the
same formula to
=SUM(OFFSET(J45,0,0,0,L12))
to sum across columns it gives me a result #REF!

What would be the correct formula to sum across columns.



.

  #3   Report Post  
sd
 
Posts: n/a
Default

However if you look at the formula I want the cells J45 thru N45 summed both
within acceptable range within the worksheet
Is there any other formula other than offset that can be used to sum across
columns
I basically transposed it to rows and achieved the desired result but was
wondering what was wrong with my formula


"Jason Morin" wrote in message
...
#REF! means that the range is beyond the worksheet. In
which cell is your formula located? For example, if it
were in IV1 and L12 = 5, you'll receive an error because
there are no more columns beyond column IV.

The error can also be caused if you delete rows and/or
columns that the formula is referencing.

HTH
Jason
Atlanta, GA

-----Original Message-----
I need to sum a range based on the number on another cell
I use the following function to get that
=SUM(OFFSET(J45,0,0,L12)) (basically summing J45 thru

J49 since cell L12
contains value 5)
I gives me the correct result from above formula when

summing across rows.

However when I change that formula to sum across columns

and changing the
same formula to
=SUM(OFFSET(J45,0,0,0,L12))
to sum across columns it gives me a result #REF!

What would be the correct formula to sum across columns.



.



  #4   Report Post  
Aladin Akyurek
 
Posts: n/a
Default


=SUM(OFFSET(J45,0,0,1,L12))

=SUM(J45:INDEX(J45:IV45,L12))

sd Wrote:
I need to sum a range based on the number on another cell
I use the following function to get that
=SUM(OFFSET(J45,0,0,L12)) (basically summing J45 thru J49 since cell
L12
contains value 5)
I gives me the correct result from above formula when summing across
rows.

However when I change that formula to sum across columns and changing
the
same formula to
=SUM(OFFSET(J45,0,0,0,L12))
to sum across columns it gives me a result #REF!

What would be the correct formula to sum across columns.



--
Aladin Akyurek
------------------------------------------------------------------------
Aladin Akyurek's Profile: http://www.excelforum.com/member.php...fo&userid=4165
View this thread: http://www.excelforum.com/showthread...hreadid=319477

  #5   Report Post  
Domenic
 
Posts: n/a
Default


You need to correct the fourth parameter (height) in the offset
function...

=SUM(OFFSET(J45,0,0,1,L12))

Hope this helps!

sd Wrote:
I need to sum a range based on the number on another cell
I use the following function to get that
=SUM(OFFSET(J45,0,0,L12)) (basically summing J45 thru J49 since cell
L12
contains value 5)
I gives me the correct result from above formula when summing across
rows.

However when I change that formula to sum across columns and changing
the
same formula to
=SUM(OFFSET(J45,0,0,0,L12))
to sum across columns it gives me a result #REF!

What would be the correct formula to sum across columns.



--
Domenic
------------------------------------------------------------------------
Domenic's Profile: http://www.excelforum.com/member.php...o&userid=10785
View this thread: http://www.excelforum.com/showthread...hreadid=319477



  #6   Report Post  
sd
 
Posts: n/a
Default

Thanks guys it works now.

"Domenic" wrote in message
...

You need to correct the fourth parameter (height) in the offset
function...

=SUM(OFFSET(J45,0,0,1,L12))

Hope this helps!

sd Wrote:
I need to sum a range based on the number on another cell
I use the following function to get that
=SUM(OFFSET(J45,0,0,L12)) (basically summing J45 thru J49 since cell
L12
contains value 5)
I gives me the correct result from above formula when summing across
rows.

However when I change that formula to sum across columns and changing
the
same formula to
=SUM(OFFSET(J45,0,0,0,L12))
to sum across columns it gives me a result #REF!

What would be the correct formula to sum across columns.



--
Domenic
------------------------------------------------------------------------
Domenic's Profile:

http://www.excelforum.com/member.php...o&userid=10785
View this thread: http://www.excelforum.com/showthread...hreadid=319477



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
basic pie chart question KayR Charts and Charting in Excel 4 January 23rd 05 08:16 PM
OFFSET and array formulae Wazooli Excel Discussion (Misc queries) 3 January 20th 05 12:09 AM
Offset? Patrick_KC Excel Discussion (Misc queries) 1 November 29th 04 10:17 PM
Have a question on scrolling sum with Excel. A question on scrolling sum Excel Worksheet Functions 0 October 31st 04 05:54 PM
end of worksheet question olmedic Excel Worksheet Functions 1 October 29th 04 08:55 PM


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