+ Reply to Thread
Results 1 to 8 of 8

Find out the Row and Column address number of the searched cell (separately)

  1. #1
    Forum Contributor
    Join Date
    08-12-2010
    Location
    Excel World
    MS-Off Ver
    Excel 2010 & 2007
    Posts
    210

    Thumbs up Find out the Row and Column address number of the searched cell (separately)

    Hi All,

    I have written below codes to find the searched cell address, but it is not working, when I want to know the searched cell's Row and Column number individually, (so that I can use them for my further codes or procedures).

    I have taken Dim iValue As Variant, please let me know if it is right for all the string or long integer, numeric values.

    Please Login or Register  to view this content.
    Thanks in advance!
    Last edited by SunOffice; 09-05-2011 at 09:33 PM.
    Excelforum is Completely Awesome! True learning with Live Examples & Best Techniques!!

  2. #2
    Forum Guru mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,207

    Re: Find out the Row and Column address number of the searched cell (separately)

    Have you looked at the .Row or .Column properties of a range object?
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,647

    Re: Find out the Row and Column of the searched cell

    Please Login or Register  to view this content.
    Last edited by snb; 09-03-2011 at 12:39 PM.



  4. #4
    Forum Contributor
    Join Date
    08-12-2010
    Location
    Excel World
    MS-Off Ver
    Excel 2010 & 2007
    Posts
    210

    Re: Find out the Row and Column address number of the searched cell (separately)

    I've just written above codes on best of my knowledge. Please let me know if anything is beyond; is for my learning.

    snb — Thank you for your quick reply! yeah First I need to recognize the Row and Column number (address) individually, then I have to pass (assign) those values on the respective ActiveSheet.Cells(Row, Column).Value. plz see my method of using them for further actions.
    Last edited by SunOffice; 09-03-2011 at 12:44 PM.

  5. #5
    Forum Guru mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,207

    Re: Find out the Row and Column address number of the searched cell (separately)

    It looks like you might be interested in the .EntireRow and .EntireColumn properties.

  6. #6
    Forum Contributor
    Join Date
    08-12-2010
    Location
    Excel World
    MS-Off Ver
    Excel 2010 & 2007
    Posts
    210

    Re: Find out the Row and Column address number of the searched cell (separately)

    Thank you snb and mikerickson,

    Please see below codes, hope now I think it is more understandable for you from my side ...and help me out more. I have just edited your codes; and see now it's working fine for me.

    Please Login or Register  to view this content.

    ..just one question that If I don't find any search value output then how can I Exit Sub with a MsgBox "Searched value or text not found.", vbCritical??
    B'cuz if I don't enter any value/ text or click on 'Cancel' button of the InputBox, then also the codes run, and sometime runs at a wrong column. Please look into this matter and help me out.
    Last edited by SunOffice; 09-05-2011 at 08:25 AM.

  7. #7
    Valued Forum Contributor mohd9876's Avatar
    Join Date
    05-04-2011
    Location
    Amman, Jordan
    MS-Off Ver
    Excel 2010
    Posts
    426

    Re: Find out the Row and Column address number of the searched cell (separately)

    try this
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    08-12-2010
    Location
    Excel World
    MS-Off Ver
    Excel 2010 & 2007
    Posts
    210

    Re: Find out the Row and Column address number of the searched cell (separately)

    Thank you so much mohd9876, snb, mikerickson

    It works fine, now this thread is solved. You guys are awesome!!

    Thanks again.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1