Hi, I have names in a column but some cells are empty. I want to grab the first 32 names and put them into an array, but how would I skip over the empty cells? THis is using vba.
I have another question: If my data is in rows 1 to 1500, how do I pick off the data and put it in the array sequentially from 0 to 31?
Currently, I am back to my original problem. If there is data on line 400 and 402, then 401 is blank, and the array index will be empty
I have
Code:
For k = 1 To 1500
If Sheets("Segment Staging").Cells(k, 3).Value <> "" Then
'Copy the name into the Array
MyArray() = Sheets("Segment Staging").Cells(k, 3).Value
Next k
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.