ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   subscript out of range (https://www.excelbanter.com/excel-programming/301136-subscript-out-range.html)

Todd Huttenstine[_3_]

subscript out of range
 
Whats wrong with the below code? I am getting the error subscript out of
range.

Worksheets("Reps Current").Range("H1").Value = "= (Total" & IndxNumber & " -
'On Time " & IndxNumber & "')/ Total" & IndxNumber



Todd Huttenstine



david mcritchie

subscript out of range
 
The subscript out of range is probably not having a
a worksheet named "Reps Current" spaces have to
match exactly you could have spaces at the end, but I
don't know what the rest of it is and if it is a formula
you probably want .formula = instead of .value =

=(Total3 - 'on Time 3')/Total3
--
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Todd Huttenstine" wrote in message ...
Whats wrong with the below code? I am getting the error subscript out of
range.

Worksheets("Reps Current").Range("H1").Value = "= (Total" & IndxNumber & " -
'On Time " & IndxNumber & "')/ Total" & IndxNumber



Todd Huttenstine






All times are GMT +1. The time now is 07:27 PM.

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