ADDRESS FUNCTION

M

Michael Slattery

Hello everyone:

I have posted the following question to several forums. No one has
replied. I don't know if the question is Incredibly difficult or
Incredibly stupid.

Any help would be greatly appreciated.

Paste into calculated address?

I have the following address function in col A1.
=ADDRESS(D2, F2,(1),(TRUE),("RECORDS"))

The address is set by the values in cells D2 and F2.

All of that is working fine.

How can I instruct a VBA copy and past command to utilize the
"ADDRESS" value returned in cell A1 as the location for the paste.

I tried to give the cell a name, and I tried the
Sheet("RECORD").Range("A1")Select.

That paste my copied cells into A1:Q1 which coincidentally wipes out
the data that I wanted to copy.

Thanks,


Michael Slattery
KBDAT
 
J

JE McGimpsey

Your post is a bit confusing - what are you really trying to do? Are
sheet RECORD and sheet RECORDS different?

If you're trying to use D2 and F2 to determine where something is
pasted, I'd approach it differently. I almost never use select, and
there's no need to use an intermediate cell:

Assume you're copying a range "rng":

With Sheets("RECORD")
rng.Copy Destination:= _
Sheets("RECORDS").Cells(.Cells(2, 4).Value, .Cells(2, 6).Value)
End With
 

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