giraffe3289
08-17-2008, 01:33 PM
Hi all,
I'm importing data from an access database into a spreadsheet. Every time I refresh the data it has the potential to vary in number of entries/length. One field (active doctors) will ALWAYS be filled in but some of the other fields may have blank entries (malpractice insurance). I've selected the active doctors by selecting until there is a blank cell and put it into an array:
Dim DocListName As Variant
' Selects active practitioner list with last name, first name, and title
Range("B2").Select
DocListName = Range(Selection, Selection.End(xlDown)).Value
But then I need to select the same number of malpractice insurance entries as the active doctors without stopping at blank cells. The code I have now is similar to above and is as follows:
Dim MalPrac As Variant
' Selects malpractice insurance list
Range("N2").Select
MalPrac = Range(Selection, Selection.End(xlDown)).Value
However, if there are blank entries, it stops at those cells and doesn't fill the array to the same length as the active doctors array.
Thanks for all your help,
Giraffe3289
I'm importing data from an access database into a spreadsheet. Every time I refresh the data it has the potential to vary in number of entries/length. One field (active doctors) will ALWAYS be filled in but some of the other fields may have blank entries (malpractice insurance). I've selected the active doctors by selecting until there is a blank cell and put it into an array:
Dim DocListName As Variant
' Selects active practitioner list with last name, first name, and title
Range("B2").Select
DocListName = Range(Selection, Selection.End(xlDown)).Value
But then I need to select the same number of malpractice insurance entries as the active doctors without stopping at blank cells. The code I have now is similar to above and is as follows:
Dim MalPrac As Variant
' Selects malpractice insurance list
Range("N2").Select
MalPrac = Range(Selection, Selection.End(xlDown)).Value
However, if there are blank entries, it stops at those cells and doesn't fill the array to the same length as the active doctors array.
Thanks for all your help,
Giraffe3289