Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
nockam
 
Posts: n/a
Default Sum column based on column heading


I have a sheet where i export in data that has to have text to columns
ran on it in order to get it out of a single cell. From there I need to
find the column with the heading "column ex" Then add "column ex" The
problem is "column ex" is not always in the same column, somtimes its
column B, or C, or D all the way up to X. Does anyone have any
suggestions? I have been trying this now for an hour with several
differnet ways but so far i havent had any luck. Thanks Garrett


--
nockam
------------------------------------------------------------------------
nockam's Profile: http://www.excelforum.com/member.php...o&userid=15744
View this thread: http://www.excelforum.com/showthread...hreadid=500507

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Govind
 
Posts: n/a
Default Sum column based on column heading

Hi,

Try using this formula

=SUM(OFFSET(A1,1,MATCH("column ex",$A$1:$H$1)-1,1000))

where A1:H1 is where you have the column headers and 1000 at the end of
the formula represents number of rows you have to sum. If you have more
than 1000 rows to sum, you can change it to the actual number of rows.

Regards

Govind.

nockam wrote:
I have a sheet where i export in data that has to have text to columns
ran on it in order to get it out of a single cell. From there I need to
find the column with the heading "column ex" Then add "column ex" The
problem is "column ex" is not always in the same column, somtimes its
column B, or C, or D all the way up to X. Does anyone have any
suggestions? I have been trying this now for an hour with several
differnet ways but so far i havent had any luck. Thanks Garrett


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Sum column based on column heading

Hi!

One way:

Assumptions:

Row 1 is the header row
Values to sum are in row 2 to row 10

=SUM(OFFSET(A1,1,MATCH("column ex",1:1,0)-1,ROWS(A2:A10)))

Biff

"nockam" wrote in
message ...

I have a sheet where i export in data that has to have text to columns
ran on it in order to get it out of a single cell. From there I need to
find the column with the heading "column ex" Then add "column ex" The
problem is "column ex" is not always in the same column, somtimes its
column B, or C, or D all the way up to X. Does anyone have any
suggestions? I have been trying this now for an hour with several
differnet ways but so far i havent had any luck. Thanks Garrett


--
nockam
------------------------------------------------------------------------
nockam's Profile:
http://www.excelforum.com/member.php...o&userid=15744
View this thread: http://www.excelforum.com/showthread...hreadid=500507



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Sum column based on column heading

An even better way:

Assume your data (including headers) is in row 1 to row 10:

=SUM(INDEX(1:10,,MATCH("column ex",1:1,0)))

Biff

"Biff" wrote in message
...
Hi!

One way:

Assumptions:

Row 1 is the header row
Values to sum are in row 2 to row 10

=SUM(OFFSET(A1,1,MATCH("column ex",1:1,0)-1,ROWS(A2:A10)))

Biff

"nockam" wrote in
message ...

I have a sheet where i export in data that has to have text to columns
ran on it in order to get it out of a single cell. From there I need to
find the column with the heading "column ex" Then add "column ex" The
problem is "column ex" is not always in the same column, somtimes its
column B, or C, or D all the way up to X. Does anyone have any
suggestions? I have been trying this now for an hour with several
differnet ways but so far i havent had any luck. Thanks Garrett


--
nockam
------------------------------------------------------------------------
nockam's Profile:
http://www.excelforum.com/member.php...o&userid=15744
View this thread:
http://www.excelforum.com/showthread...hreadid=500507





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
nockam
 
Posts: n/a
Default Sum column based on column heading


That did the trick! Thanks to both of you for your help. I would have
been up working a lot longer tonight if you two didn't come along and
save me! Thanks, Garrett


--
nockam
------------------------------------------------------------------------
nockam's Profile: http://www.excelforum.com/member.php...o&userid=15744
View this thread: http://www.excelforum.com/showthread...hreadid=500507

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
move contents of column C based on criteria related to column A Debra Excel Discussion (Misc queries) 2 December 27th 05 10:25 PM
"Cumulative" column based on a pivot table sum column? Robert Day Excel Worksheet Functions 2 December 15th 05 09:20 PM
match and count words David Excel Worksheet Functions 5 July 4th 05 02:24 AM
Return Count for LAST NonBlank Cell in each Row Sam via OfficeKB.com Excel Worksheet Functions 12 April 17th 05 10:36 PM
Calculating totals in a column based on a lookup in another column Michael Wright via OfficeKB.com Excel Worksheet Functions 1 April 15th 05 09:52 AM


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