Sep 28 2021 11:25 PM
PC running Windows 10 Pro Version 20H2
Microsoft 365 Apps for business, Excel Version 2108
Hi All,
I'm trying to understand the behaviour of named ranges when used in VBA compared to directly in the sheet.
I have named ranges:
When I enter '=RangeB' at Sheet1!C10, the entire range is entered on the sheet. If I use VBA to put '=RangeB' in the formula for different cells I get different results:
The code is:
I've attached the workbook.
I'd like to use the named range on one worksheet to transfer the data to another sheet. I was expecting the formula when created through VBA to behave the same way as when entered in the sheet.
I'm not sure why the '@' is being inserted, or how to turn it off.
I'd appreciate any guidance on this.
Regards,
Nic
Sep 29 2021 12:22 AM
Solution@NicJ999 use .Formula2
See attached article.
https://docs.microsoft.com/en-us/office/vba/api/excel.range.formula2
Sep 29 2021 12:26 AM
Sep 29 2021 12:22 AM
Solution@NicJ999 use .Formula2
See attached article.
https://docs.microsoft.com/en-us/office/vba/api/excel.range.formula2