Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 238
Default adding data column without changing sheets

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default adding data column without changing sheets

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


"Fan924" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 238
Default adding data column without changing sheets

Thanks Tim, workes great!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 freezing when changing a cell or adding new data hoffmaks Excel Discussion (Misc queries) 1 May 24th 09 07:07 AM
Changing and Adding data through ODBC connection Bob Excel Discussion (Misc queries) 0 November 3rd 08 05:04 PM
Autofill 1 column with changing data and changing range cdclayton Excel Programming 0 August 5th 08 04:37 PM
Adding Column A for All sheets : Please HELP jhong Excel Programming 4 February 5th 08 07:02 AM
Consolidate data on different sheets in a changing range Ciara Excel Programming 0 September 12th 06 02:21 PM


All times are GMT +1. The time now is 02:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"