Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If your variables are stored in cells, you can do something like the
following: 1. Assuming the value of mFrow is stored in A1 and the value of mLrow is stored in A2. 2. In cell A3, write down the following: =TEXT("H" & A1 & ":H" & A2, "") 3. In cell A4, you can get your sum with the following formula: =SUM(INDIRECT(A3)) Basically, in cell A3, we are building up the expression "H1:H10" and in cell A4, we are using the string in A3 to build the range using the INDIRECT() function. - Chirag Shortcut Manager - Assign keyboard shortcuts to Excel menu items and macros. http://officeone.mvps.org/xlsctmgr/xlsctmgr.html "bmurlidhar" wrote in message ... I want to give sum command i.e. =SUM(H1:H10) and my variable for mFrow = 1 and mLrow = 10 how can i use variable in function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help on macro coding for URL | Excel Worksheet Functions | |||
Please help on coding the macro. | Excel Worksheet Functions | |||
HELP - coding on Macro! | Excel Worksheet Functions | |||
Including a third variable in a point diagram by color-coding | Excel Discussion (Misc queries) | |||
coding macro | Excel Discussion (Misc queries) |