ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Formula to calculate a sum (https://www.excelbanter.com/excel-discussion-misc-queries/217079-formula-calculate-sum.html)

Sirhc

Formula to calculate a sum
 
I have a spreadsheet with headings for the months in cells K3 (JAN) thru V3
(DEC)and values in the rows below. I am trying to come up with a formula
that will allow me to plug a month in J3 and have it SUM the corresponding
balance for the year (i.e. I enter MAY and the formula will return the SUM of
O3 (MAY) thru V3 (DEC) for each row.

Any help would be greatly appreciated!

T. Valko

Formula to calculate a sum
 
Try this...

Headers in row 3, data to sum in row 4...

=IF(J3="","",SUM(V4:INDEX(K4:V4,MATCH(J3,K3:V3,0)) ))

--
Biff
Microsoft Excel MVP


"Sirhc" wrote in message
...
I have a spreadsheet with headings for the months in cells K3 (JAN) thru V3
(DEC)and values in the rows below. I am trying to come up with a formula
that will allow me to plug a month in J3 and have it SUM the corresponding
balance for the year (i.e. I enter MAY and the formula will return the SUM
of
O3 (MAY) thru V3 (DEC) for each row.

Any help would be greatly appreciated!





All times are GMT +1. The time now is 08:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com