adding data column without changing sheets

  • Thread starter Thread starter Fan924
  • Start date Start date
F

Fan924

I am on Sheet1 and I want to run this macro without changing sheets.
I am adding data column on Sheet2 using the following and the result
on Sheet1. The way I am doing it now changes the displayed sheet and
then returns to Sheet1. This is not what I want. TIA

Worksheets("Sheet2").Select
vData = Range("C" & RowStart & ":C" & RowStop).Value2
For j = LBound(vData) To UBound(vData)
ChkSum = ChkSum + Val("&h" & UCase(vData(j, 1)))
Next j
Worksheets("Sheet1").Select
 
vData = Worksheets("Sheet2").Range("C" & RowStart & ":C" &
RowStop).Value2
For j = LBound(vData) To UBound(vData)
ChkSum = ChkSum + Val("&h" & UCase(vData(j, 1)))
Next j

Tim
 
Back
Top