Range to array excluding null values
Hello,
Is there a way to create an array from a range with the formula (varArray = RangeAddress) but excluding empty cells in the range (ot any value) It can be done by looping, but I am looking for the quick formula way Thanks avi |
Range to array excluding null values
avi,
No need to use an array. You can directly address the cells of the range using: Dim mcC As Range For Each myC In Range("D2:D16").SpecialCells(xlCellTypeConstants, 23) 'whatever you want here Next myC -- HTH, Bernie MS Excel MVP "avi" wrote in message ... Hello, Is there a way to create an array from a range with the formula (varArray = RangeAddress) but excluding empty cells in the range (ot any value) It can be done by looping, but I am looking for the quick formula way Thanks avi |
Range to array excluding null values
Thanks but I really need it as an array for the rest of my application
Avi |
Range to array excluding null values
Avi,
Then you will need to loop through the cells as shown and assign the values to the array, after using redim on the array to set the size. Bernie "avi" wrote in message ... Thanks but I really need it as an array for the rest of my application Avi |
All times are GMT +1. The time now is 06:08 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com