Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Ken Ken is offline
external usenet poster
 
Posts: 590
Default refer to whole column

Hi!

How do I refer to a whole column by a number of a cell? For example, if a
number of a certain cell is 1, then the column will be A:A. If a number of a
cell is 3, the column will be C:C.

I will be using the result as the [Sum_Range] in a SUMIF function.

Thank you very much!

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default refer to whole column

=sumif(x:x,"xxx",indirect("C"&z999,false))

Where x:x contains the value you want to compare.
And z999 contains the column number


Ken wrote:

Hi!

How do I refer to a whole column by a number of a cell? For example, if a
number of a certain cell is 1, then the column will be A:A. If a number of a
cell is 3, the column will be C:C.

I will be using the result as the [Sum_Range] in a SUMIF function.

Thank you very much!


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default refer to whole column

You can do this without indirect. You can use index instead something like
this. The advantage is that index is not volatile saving the overhead of
recalculating.

=sumif(x:x,"xxx",INDEX(B:Z,,A1))

Where A1 contains the column number.

--
HTH...

Jim Thomlinson


"Dave Peterson" wrote:

=sumif(x:x,"xxx",indirect("C"&z999,false))

Where x:x contains the value you want to compare.
And z999 contains the column number


Ken wrote:

Hi!

How do I refer to a whole column by a number of a cell? For example, if a
number of a certain cell is 1, then the column will be A:A. If a number of a
cell is 3, the column will be C:C.

I will be using the result as the [Sum_Range] in a SUMIF function.

Thank you very much!


--

Dave Peterson
.

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 can I refer to an entire column? Katyounge New Users to Excel 4 September 24th 07 02:10 PM
Refer to column width in conditional formatting sammy Excel Discussion (Misc queries) 4 September 7th 07 02:43 AM
Countif forumulas that refer to more than one column Karl Excel Worksheet Functions 4 March 6th 07 12:11 AM
How to refer to current column in a formula? jmg092548 Excel Discussion (Misc queries) 4 August 10th 05 08:00 PM
Trying to get a column of numbers to refer back Overbaked Excel Worksheet Functions 1 December 30th 04 07:36 PM


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