Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there a way to reference a cell on a non-active sheet, without first
activating or selecting that sheet? I'm writing code to compare 2 near-identical tables and copy the differences into a summary table. I'm finding that jumping back and forth between the two tables takes quite a lot of time (when it's done for hundred's of rows with ~20 columns). Is there a way for me to reference the cells on each sheet without activating them? The cells to be compared are in identical places, just on different sheets. For example: If Worksheet(1).Range(R,C).Value < Worksheet(2).Range(R,C).Value Then ... Is this possible? Thanks, KellyB |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If Worksheet(1).Cells(R,C).Value < Worksheet(2).Cells(R,C).Value Then
You almost had it. -- Regards, Tom Ogilvy "KellyB" wrote in message ... Is there a way to reference a cell on a non-active sheet, without first activating or selecting that sheet? I'm writing code to compare 2 near-identical tables and copy the differences into a summary table. I'm finding that jumping back and forth between the two tables takes quite a lot of time (when it's done for hundred's of rows with ~20 columns). Is there a way for me to reference the cells on each sheet without activating them? The cells to be compared are in identical places, just on different sheets. For example: If Worksheet(1).Range(R,C).Value < Worksheet(2).Range(R,C).Value Then ... Is this possible? Thanks, KellyB |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That does work. I was using the Range(R,C) property before and it wasn't
working. Not sure why. The Cells property does work. Any info on why this is? Thank. "Tom Ogilvy" wrote: If Worksheet(1).Cells(R,C).Value < Worksheet(2).Cells(R,C).Value Then You almost had it. -- Regards, Tom Ogilvy "KellyB" wrote in message ... Is there a way to reference a cell on a non-active sheet, without first activating or selecting that sheet? I'm writing code to compare 2 near-identical tables and copy the differences into a summary table. I'm finding that jumping back and forth between the two tables takes quite a lot of time (when it's done for hundred's of rows with ~20 columns). Is there a way for me to reference the cells on each sheet without activating them? The cells to be compared are in identical places, just on different sheets. For example: If Worksheet(1).Range(R,C).Value < Worksheet(2).Range(R,C).Value Then ... Is this possible? Thanks, KellyB |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Range will only accept multiple arguments if they are ranges or can be seen
as ranges. Range("A1").Address or Range("A1","B2").Address Range doesn't accept row/column as separate arguments. That is why we have CELL. -- Regards, Tom Ogilvy "KellyB" wrote in message ... That does work. I was using the Range(R,C) property before and it wasn't working. Not sure why. The Cells property does work. Any info on why this is? Thank. "Tom Ogilvy" wrote: If Worksheet(1).Cells(R,C).Value < Worksheet(2).Cells(R,C).Value Then You almost had it. -- Regards, Tom Ogilvy "KellyB" wrote in message ... Is there a way to reference a cell on a non-active sheet, without first activating or selecting that sheet? I'm writing code to compare 2 near-identical tables and copy the differences into a summary table. I'm finding that jumping back and forth between the two tables takes quite a lot of time (when it's done for hundred's of rows with ~20 columns). Is there a way for me to reference the cells on each sheet without activating them? The cells to be compared are in identical places, just on different sheets. For example: If Worksheet(1).Range(R,C).Value < Worksheet(2).Range(R,C).Value Then .... Is this possible? Thanks, KellyB |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Referencing an active cell's content from another sheet. | Excel Worksheet Functions | |||
Referencing cell in active row | Excel Worksheet Functions | |||
referencing active cell works in a sub but not in a custom function | Excel Worksheet Functions | |||
referencing active cell works in a sub but not in a custom function | Excel Worksheet Functions | |||
In 3 active sheets in wkbk, determine& display the # of sheets that have data | Excel Discussion (Misc queries) |