Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would like to pass a variable through a function. Based on the value, I
have some ranges already name ie. Dataquestion#. I would like to be able to change the named range to use in this formula based on numbers, such as mQNo. Any help would be appreciated. mQNo = 1 Set mQuestionRange1 = Worksheets("Data").Range(Chr(34) & "DataQuestion" & mQNo & Chr(34)) |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() This is siomple. I don't think you understadn strings. You don't need a second set of double quotes. It is that simple for example Var1 = "abc" Var2 = "def" Var12 & Var2 will equal "abcdef" You don't need to do this chr(34) & Var1 & Var2 & chr(34) It would results in this ""abcdef"" Likewise this is wrong Set mQuestionRange1 = Worksheets("Data").Range(Chr(34) & "DataQuestion" & mQNo & Chr(34)) Instead use this Set mQuestionRange1 = Worksheets("Data").Range("DataQuestion" & mQNo) -- joel ------------------------------------------------------------------------ joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=157316 Microsoft Office Help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Fill range don't change the formula, Help was no help. Please hel | Excel Worksheet Functions | |||
change text case of some selected words from formula bar. | Excel Programming | |||
how do i create a formula for selected range? | Excel Worksheet Functions | |||
How can you change the color of the selected range? | Excel Discussion (Misc queries) | |||
Change value of each cell in selected range by percentage | Excel Programming |