Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default excel problem: sum(address(4,2,1):address(2,1,1))

I want to construct ranges using the address function, but it comes out
invalid. An example is
sum (address(4,2,1):address(20,2,1))
or
sum (address(e7,2,1):address(e8,2,1))

but I keep getting that this is invalid.
The general idea is to be able to use another cell to tell me where a range
begins and ends. I was able to do this years ago in 123, but excel has
trouble with it.
How can I accomplish this?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default excel problem: sum(address(4,2,1):address(2,1,1))

On Thu, 21 Dec 2006 18:21:01 -0800, DrSlowpoke
wrote:

I want to construct ranges using the address function, but it comes out
invalid. An example is
sum (address(4,2,1):address(20,2,1))
or
sum (address(e7,2,1):address(e8,2,1))

but I keep getting that this is invalid.
The general idea is to be able to use another cell to tell me where a range
begins and ends. I was able to do this years ago in 123, but excel has
trouble with it.
How can I accomplish this?



The ADDRESS worksheet function returns a string, not a cell reference. From
HELP: "Creates a cell address as text"


So if you want to create a function to do what you describe above, you need
something like:

=SUM(INDIRECT(ADDRESS(4,2,1)&":"&ADDRESS(20,2,1)))


--ron
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default excel problem: sum(address(4,2,1):address(2,1,1))

Try one of these:

=SUM(INDIRECT(ADDRESS(4,2,1)&":"&ADDRESS(20,2,1)))

E7 = 4
E8 = 20

=SUM(INDIRECT(ADDRESS(E7,2,1)&":"&ADDRESS(E8,2,1)) )

=SUM(INDIRECT("B"&E7):INDEX(B:B,E8))

=SUM(B4:INDEX(B:B,E8))

Biff

"DrSlowpoke" wrote in message
...
I want to construct ranges using the address function, but it comes out
invalid. An example is
sum (address(4,2,1):address(20,2,1))
or
sum (address(e7,2,1):address(e8,2,1))

but I keep getting that this is invalid.
The general idea is to be able to use another cell to tell me where a
range
begins and ends. I was able to do this years ago in 123, but excel has
trouble with it.
How can I accomplish this?



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
Stop excel from dropping the 0 in the beginning of a number? Rosewood Setting up and Configuration of Excel 12 April 4th 23 02:12 PM
Running Excel 2000 VBA Application on Excel 2003 Excel Worksheet Functions 0 August 8th 06 06:04 PM
Excel 2003 code, problem in Excel 97 brianbishop Excel Discussion (Misc queries) 1 July 26th 06 04:35 PM
Excel 2000 problem copying drawingobjects between sheets SiriS Excel Discussion (Misc queries) 0 February 8th 06 10:31 AM
Urgent Help Required on Excel Macro Problem Sachin Shah Excel Discussion (Misc queries) 1 August 17th 05 06:26 AM


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