Multi-dimensional Array Referencing

F

Fred Kalil

Hi all

I'm trying to devise a way to reference and update from a table of data
to random areas in the worksheet.

For e.g.

If I have a table of data :-

AB1 John
AB2 Doe
AB3 Mary

I want to any references in the worksheet that has AB1 or AB2 or AB3 to
find and replace it with the approriate names. And if changes were made
to the names, all the references will be updated accordingly.

I'm a begineer in VBA but I did manage to read up on multi-dimensional
arrays but I'm stuck on how to reference this arrays to the approriate
fields in the worksheet.

Do need help here.

Thanks

Fred Kalil
 
B

Bob Phillips

With Activesheet
For i = LBound(ary) To UBound(ary)
Replace(Cells,ary(i,0),ary(i,1))
Next i
End With

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
T

Tushar Mehta

If AB1, AB2, etc. are cell references, you can get XL to do what you
want.

Select each cell and enter the desired name in the Name Box.
Alternatively, enter all the names one by one through the dialog box
shown by Insert | Name > Define...

Next, select any single cell; then select Insert | Name > Apply... In
the resulting dialog box, select every name that you want converted
from a cell reference to a name and click OK.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top