View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Using a string to reference an address

try

Sub copyfoundcell()
On Error GoTo nofind
With Sheets("sheet17")
..Rows(.Columns(1).Find(Date).Row).Find("fto").Cop y _
Sheets("sheet15").Range("b2")
End With
Exit Sub
nofind: MsgBox "Not Found"
End Sub
--
Don Guillett
SalesAid Software

"anna" wrote in message
...
Okay, I think I solved my own problem, BUT if anyone has a better, more
efficient method - please share!

Here's what I used: Cells(strCell, 1).Copy

"anna" wrote:

I want to use my strCell to reference an address, such as "A1" - how
would I
copy this cell? strCell.Copy does not work - I'm assuming it is because
I am
using a string and excel can't read my mind :)

If rngCodeFound Is Nothing Then
MsgBox "No FTO"
'Code is found
Else
strCell = rngCodeFound.Address
strCell = Right(strCell, 2)
strCell = ("A" + strCell)
' copy the cell that strCell variable references
' paste the copied cell to a new wks
End If