![]() |
#4
|
|||
|
|||
![]()
Pretty easy to do actually. Make sure to dim your other worksheets and give them a variable name such as ws and ws1. I will typically use ws for the worksheet that has the data and then rws for the worksheet that gets the results. When you set something you are telling Excel that you want to reference an object. This is different than setting a string = "Your Name Here" which you would do like so.
Code:
TestString = "Your Name Here" Code:
Dim ws as Worksheet, rws as Worksheet Set ws = ThisWorkbook.Worksheets("Data") Set rws = ThisWorkbook.Worksheets("Results") Code:
Dim ws as Worksheet, rws as Worksheet, wb as Workbook Set wb = ThisWorkbook Set ws = wb.Worksheets("Data") Set rws = wb.Worksheets("Results") Thanks |
Tags |
loop, range |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
TBD | Excel | 3 | 06-09-2014 06:14 AM |
![]() |
shabbaranks | Excel | 17 | 05-13-2014 06:47 PM |
How do you loop through an array with some empty values? | omahadivision | Excel Programming | 5 | 11-28-2013 10:49 AM |
change values based on cell | ubns | Excel | 1 | 05-21-2012 06:28 PM |
![]() |
flackend | Excel | 2 | 08-26-2011 07:01 AM |