Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I use a formula to obtain the row of the value I am seeking to obtain which
is in a different worksheet than the one I am working in. I am trying to use the following strOffset = "R" & Trim(Str(intColNo)) & "C3" intDayDiff = Worksheets(strMstSht).Range(strOffset).Value strOffset does contain the correct column # and returns R7C3. However I get an error in the intDayDiff line. Any help would be appreciated. -- M. Shipp |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Range does not support R1C1 references.
I would suggest Worksheets(strMstSht).Cells(intColNo,3).Value but why would your row number be in a variable named intColNo? -- Regards, Tom Ogilvy "SHIPP" wrote in message ... I use a formula to obtain the row of the value I am seeking to obtain which is in a different worksheet than the one I am working in. I am trying to use the following strOffset = "R" & Trim(Str(intColNo)) & "C3" intDayDiff = Worksheets(strMstSht).Range(strOffset).Value strOffset does contain the correct column # and returns R7C3. However I get an error in the intDayDiff line. Any help would be appreciated. -- M. Shipp |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks very much for everybodys help. In answer to your quesion I am creating
a schedule for the construction industry which takes into consideration Saturdays, Sundays, and Holidays. I initially set-up a schedule based on days between steps and days between homes. As the schedule progresses the user can manually override the calculations. I then do a search backwards on the schedule to find the first cell that is not a formula. From that point forward I have to recalculate the workdays to eliminate Sat. Sun. and Holidays. Because there is a direct relationship between the worksheets I am able to determine which step and lot I am on and consequently the lead time between activities. -- M. Shipp "Tom Ogilvy" wrote: Range does not support R1C1 references. I would suggest Worksheets(strMstSht).Cells(intColNo,3).Value but why would your row number be in a variable named intColNo? -- Regards, Tom Ogilvy "SHIPP" wrote in message ... I use a formula to obtain the row of the value I am seeking to obtain which is in a different worksheet than the one I am working in. I am trying to use the following strOffset = "R" & Trim(Str(intColNo)) & "C3" intDayDiff = Worksheets(strMstSht).Range(strOffset).Value strOffset does contain the correct column # and returns R7C3. However I get an error in the intDayDiff line. Any help would be appreciated. -- M. Shipp |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
M.,
Range only accepts A1 style references. So you could use: strOffset = "C" & intColNo intDayDiff = Worksheets(strMstSht).Range(strOffset).Value Or, you could use the .Cells object, which takes row and column numbers: intDayDiff = Worksheets(strMstSht).Cells(intColNo, 3).Value HTH, Bernie MS Excel MVP "SHIPP" wrote in message ... I use a formula to obtain the row of the value I am seeking to obtain which is in a different worksheet than the one I am working in. I am trying to use the following strOffset = "R" & Trim(Str(intColNo)) & "C3" intDayDiff = Worksheets(strMstSht).Range(strOffset).Value strOffset does contain the correct column # and returns R7C3. However I get an error in the intDayDiff line. Any help would be appreciated. -- M. Shipp |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Range does not use RC designations, Cells does. Try using something more like
this: intDayDiff = Worksheets(strMstSht).Cells(intColNo, 3).Value -- HTH... Jim Thomlinson "SHIPP" wrote: I use a formula to obtain the row of the value I am seeking to obtain which is in a different worksheet than the one I am working in. I am trying to use the following strOffset = "R" & Trim(Str(intColNo)) & "C3" intDayDiff = Worksheets(strMstSht).Range(strOffset).Value strOffset does contain the correct column # and returns R7C3. However I get an error in the intDayDiff line. Any help would be appreciated. -- M. Shipp |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Trouble in Dragging the cell | Excel Worksheet Functions | |||
Trouble splitting cell contents | Excel Discussion (Misc queries) | |||
Cell locking trouble | Excel Discussion (Misc queries) | |||
Cell locking trouble | New Users to Excel | |||
trouble with cell choice | Excel Programming |