View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default **URGENT** Macro to find a Cell

I would be inclined to leave Y as being of type variant. That way the user
can enter either a column letter or number as needed...
--
HTH...

Jim Thomlinson


"JLGWhiz" wrote:

Here is one way:

Dim x As Long
Dim y As long

x = Range("A1").Value
y = Range("B1").Value

Sheets("Revised").Activate
ActiveSheet.Cells(x, y).Select

"Lost" wrote:

If I have the column row references given on 2 cells in my spreadsheet, I
need a macro to read the contents of the two cells and then select that
particular cell.

Here is the current code I have:

Sub test()

Sheets("Revised").Activate
ActiveSheet.Cells(1, 2).Select

End Sub

In the existing code the column/row references are static. Ideally I would
like the column/row references to be dependent on what figures are listed in
cells A1 & B1, however you cannot simply enter those in 1 & 2's spot or it
will error. Help!