Hi
I have some tables of data I want to turn into records to place in a database. There are many tables in sheets (spaces, side by side etc) and they are quite irregular so I am finding it hard to automate.
I was trying to manually select the area and then run the macro - work across using cells() etc but I am have problems with selection of the range
I was looking to do something like this but setting the range from selection is causing me all sorts of problems
for j=2 to range.width
for i=2 to range.height
field1=range.cells(1,j)
field2=range.cells(i,1)
field3=range.cells(i,j)
next i
next j
Many thanks for your help
John
Dive into VBA's help files. Look for the lemmas 'currentregion' and 'areas'
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks