ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Reference Row Address (https://www.excelbanter.com/excel-programming/299844-reference-row-address.html)

scain2004[_14_]

Reference Row Address
 
If I have a range named Datalist and I want to get the address for ever
row that contains values in the third column, how can I get thi
address and put it into an array for use with a scrollbar.

Any suggestions

--
Message posted from http://www.ExcelForum.com


Norman Jones

Reference Row Address
 
Hi,

For xl2k onwards, if the values are constants, you could try:

Sub Test()

Dim Rng As Range
Dim v As Variant

Set Rng = Range("Datalist").Columns(3)
.Cells.SpecialCells (xlCellTypeConstants)

msgbox Rng.Address
v = Split(Rng.Address, ",")

End Sub

If you are using an earlier version, do a google search for a Split97
function written by Tom Ogilvy and use instes of the Split function
employed above.

---
Regards,
Norman


"scain2004 " wrote in message
...
If I have a range named Datalist and I want to get the address for every
row that contains values in the third column, how can I get this
address and put it into an array for use with a scrollbar.

Any suggestions?


---
Message posted from http://www.ExcelForum.com/




Norman Jones

Reference Row Address
 
If your values are formulae, then replace xlCellTypeConstants with
xlCellTypeFormulas. If youor data includes both , just build a union range
for both.

---
Regards,
Norman


"Norman Jones" wrote in message
...

For xl2k onwards, if the values are constants





All times are GMT +1. The time now is 09:11 AM.

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