![]() |
|
#1
|
|||
|
|||
![]() Is there a way to get an range and then get all the addresses of the range? The range would be A1:E1, the output would be $A$1,$B$1,$C$1,$D$1,$E$1. |
#2
|
|||
|
|||
![]()
Select the range A1:E1, and define it as named range, e.g. with name as nMyRange
To get a value from nMyRange, enter into cell, where you want to calculate a value from mMyRange, the formula Code:
=INDEX(nMyRange, x) To get the address of x'th cell in nMyRange, use the formula like Code:
=ADDRESS(ROW(INDEX(nMyRange,x)),COLUMN(INDEX(nMyRange,x))) |
#3
|
|||
|
|||
![]() Quote:
Quote:
Quote:
As I was searching for another solution, I ended up on a site that creates excel formulas using AI. It came up with this and it works: Code:
=TEXTJOIN(",",TRUE,ADDRESS(ROW(A1:E1),COLUMN(A1:E1))) |
#4
|
||||
|
||||
![]() Quote:
ps, you could use 4 as the ADDRESS function's 3rd argument to lose the $ symbols too. |
#5
|
|||
|
|||
![]() Quote:
https://aiexcelbot.com/formulas/logical/and |
#6
|
||||
|
||||
![]() |
#7
|
||||
|
||||
![]()
Otherwise, a user-defined function:
Code:
Function addresses(rng As Range) As String For Each cll In rng.Cells addresses = addresses & "," & cll.Address Next cll addresses = Mid(addresses, 2) End Function 2024-10-21_103925.jpg |
#8
|
||||
|
||||
![]() Quote:
__________________
Using O365 v2503 - Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using IF AND to filter number in a range, works with dragging, but not in an Array | mda99das | Excel | 5 | 11-17-2022 01:27 PM |
Loading an Excel range to an array in VBS | BobBridges | Excel Programming | 1 | 12-25-2020 01:04 PM |
![]() |
FUGMAN | Excel Programming | 7 | 02-05-2017 08:37 AM |
![]() |
adisco | Excel | 1 | 01-10-2017 10:59 AM |
![]() |
rick10r | Excel | 1 | 07-05-2016 12:07 PM |