adding data column without changing sheets

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
 
T

Tim Williams

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top