# Microsoft Office Application Help - Excel Help forum > Excel Programming / VBA / Macros >  > [SOLVED] VBA to find cell with a specific value, and ID its coordinates

## artkingjw

hi again

need help with finding a cell which contains a number, in a column (ie not the WHOLE sheet) and ID the cell's coordinates in number number form, instead of letter number, and be able to use those numbers. like when you say, activesheet.cells(row, col) instead of activesheet.range("a3") etc. i will need to be able to use the coordinates of the cell

the number has been calculated inside vba itself, don't need to worry about that 

It also needs to be able to be used on different sheets. 

thank you so much!

----------


## protonLeah

Where's the code you're using at this point??




> With SomeRange
>     Set Results = .Find(...
> End With
> x = Results.Row
> y = Results.Column

----------


## artkingjw

> Where's the code you're using at this point??



as in what code I've been using so far to find the cell and its coordinates? i haven't cuz i have no idea how to
i tried using the set results = .find( thing i want to find) method but am i doing it wrong, it points to set results and says "Object Required"

----------


## artkingjw

ok, some success, i declared results of Range and no object error NICE

so i tested the function out with f8 and find that its not searching within the range i set it:
With ActiveSheet.Range(Cells(15, 19), Cells(19, 19))

it returns me results (which are correct) but are in the wrong part of the workbook

ie it finds the same at 3,10 when i have put it in 16,19 

thoughts? 

my code so far:

Sub findvalue()
    With ActiveSheet.Range(Cells(15, 19), Cells(19, 19))
        Dim Results As Range
        Dim x As Long
        Dim y As Long

           Set Results = Cells.Find(5)

        x = Results.row
        y = Results.Column
    End With

    Debug.Print x, y


End Sub

----------


## artkingjw

http://www.ozgrid.com/VBA/find-method.htm found a solution

thanks man

----------


## artkingjw

SOLVED,

i used cells.find(thing i wanted, after (cell coordinates), xlrow )

----------

