ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to reference a precedent range in another sheet? (https://www.excelbanter.com/excel-programming/422444-how-reference-precedent-range-another-sheet.html)

[email protected]

How to reference a precedent range in another sheet?
 
Given cell formula:

=ASheetOtherThanThisOne!A1

how do I reference that range in, say, the sheet's Change event?

(This works:

with Target
n = Instr(.Formula, "!")
Set R = Worksheets(Mid(.Formula, 2, n - 2)).Range(.Formula - n)
end with

But that's not programming. That's bull****. Surely VBA has something
better?)

***

Thanks as usual to those Knights of the Web who ceaselessly help us de-
clued cats out.

***


All times are GMT +1. The time now is 07:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com