Monday, August 16, 2010

How can I use a value from a cell to refer to a particular row in Excel?

I am trying to calculate the sum of a range of cells in Excel. I want the range to be from B3 to Bx where x is a changing value that corresponds to today's date, so that the sum changes each day automatically. How can I make a value x that corresponds to a certain value, and how do I put this inot the formula for the sum?How can I use a value from a cell to refer to a particular row in Excel?
I've forgotten the exact syntax but you can use the INDIRECT function:





=INDIRECT(CONCATENATE(A1,A2))





where cell A1 is the column letter and A2 is the Row number.How can I use a value from a cell to refer to a particular row in Excel?
hello
A1 =TODAY


B1 = ';DAY';


C1 =DAY(A1)


Range A3:A33 = 1,..,31 (Days in a month)


Range B3:B33 = 12,66,14,32,... (your data)





The formula:


=SUM ( INDIRECT ( ';$B$3';%26amp;';:';%26amp; ( ADDRESS ( MATCH ( C1,A3:A33,0 ) +2,2 ) ) ) )





will give you the sume of a range of cells (B3:Bx) from day 1 to today's date.





Hope that helps

No comments:

Post a Comment