![]() |
Sum Left to Right
Excel2003 ... I have 60 Cols ... The 1st Col & every other Col contain a Code
(S, I, L, V, E, R or NQ) or are Blank ... The 2nd Col & every other Col contain a "value" or are Blank ... ie: R | 3 | S | 1 | NQ | 2 | '' | 3 | " | " | S | 4 | E | 6 | S | 3 | etc for 60 Cols The values are associated with the Code to their Left (ie: R | 3) To the Right (& 1 row above) I would like to place the Codes (S, I, L, V, E, R or NQ) in Seperate Cols ... Then write a Formula under "S" & adjacent to these each of these rows that would Sum the values associated with "S" ... In the example above ... this would be the "1", "4" & the "3" ... The value I need returned would be "8". AND, I wish to do this for each Code ... Thanks .... Kha |
Sum Left to Right
Based on your sample being in the range A1:P1
This will sum all "S's": =SUMPRODUCT(--(A1:O1="s"),B1:P1) Result = 8 Biff "Ken" wrote in message ... Excel2003 ... I have 60 Cols ... The 1st Col & every other Col contain a Code (S, I, L, V, E, R or NQ) or are Blank ... The 2nd Col & every other Col contain a "value" or are Blank ... ie: R | 3 | S | 1 | NQ | 2 | '' | 3 | " | " | S | 4 | E | 6 | S | 3 | etc for 60 Cols The values are associated with the Code to their Left (ie: R | 3) To the Right (& 1 row above) I would like to place the Codes (S, I, L, V, E, R or NQ) in Seperate Cols ... Then write a Formula under "S" & adjacent to these each of these rows that would Sum the values associated with "S" ... In the example above ... this would be the "1", "4" & the "3" ... The value I need returned would be "8". AND, I wish to do this for each Code ... Thanks ... Kha |
Sum Left to Right
Another one:
=SUMIF(A1:O1,"S",B1:P1) Ken wrote: Excel2003 ... I have 60 Cols ... The 1st Col & every other Col contain a Code (S, I, L, V, E, R or NQ) or are Blank ... The 2nd Col & every other Col contain a "value" or are Blank ... ie: R | 3 | S | 1 | NQ | 2 | '' | 3 | " | " | S | 4 | E | 6 | S | 3 | etc for 60 Cols The values are associated with the Code to their Left (ie: R | 3) To the Right (& 1 row above) I would like to place the Codes (S, I, L, V, E, R or NQ) in Seperate Cols ... Then write a Formula under "S" & adjacent to these each of these rows that would Sum the values associated with "S" ... In the example above ... this would be the "1", "4" & the "3" ... The value I need returned would be "8". AND, I wish to do this for each Code ... Thanks ... Kha -- Dave Peterson |
Sum Left to Right
I tried both "SUMIF" & "SUMPRODUCT" before posting & they both failed ... BUT
this because I used the same "Range" both before & after the "Criteria" ... (A1:P1,"S",A1:P1) ... RRR Amazing what a little tweak to the "Ranges" will do ... I am now off & running. Thank you ... Kha "Dave Peterson" wrote: Another one: =SUMIF(A1:O1,"S",B1:P1) Ken wrote: Excel2003 ... I have 60 Cols ... The 1st Col & every other Col contain a Code (S, I, L, V, E, R or NQ) or are Blank ... The 2nd Col & every other Col contain a "value" or are Blank ... ie: R | 3 | S | 1 | NQ | 2 | '' | 3 | " | " | S | 4 | E | 6 | S | 3 | etc for 60 Cols The values are associated with the Code to their Left (ie: R | 3) To the Right (& 1 row above) I would like to place the Codes (S, I, L, V, E, R or NQ) in Seperate Cols ... Then write a Formula under "S" & adjacent to these each of these rows that would Sum the values associated with "S" ... In the example above ... this would be the "1", "4" & the "3" ... The value I need returned would be "8". AND, I wish to do this for each Code ... Thanks ... Kha -- Dave Peterson |
All times are GMT +1. The time now is 08:46 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com