+ Reply to Thread
Results 1 to 4 of 4

Finding a Row Number for a cell

  1. #1
    Registered User
    Join Date
    09-03-2008
    Location
    California
    Posts
    35

    Finding a Row Number for a cell

    Hello,

    I have two sheets. Both sheets have 2 column of data. What I want is, compare a particular cell in Sheet2 with first column data in sheet1 and find the cell which has identical value and my result I want the row number where that cell is.
    I was using the IF functions as follows:

    =IF(A1='Sheet1'!A1:A120,1,0)
    this compares A1 in sheet2 with entire column A in sheet2 but returns 1 if it find a matching value.

    How can I get it to return the row number with the match cell in sheet1?
    Hope I am clear.
    Thanks

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Does this help

    =MATCH(Sheet2!A1,Sheet1!$A$1:$A$20,0)
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    09-03-2008
    Location
    California
    Posts
    35
    Thanks Noob, It works great one more quick question in continuation to the one before.
    After using the MATCH formula I get the field, what I am trying is get the field value at sheet1!B(that particular row value)
    How can I put this in one big formula?

  4. #4
    Registered User
    Join Date
    09-03-2008
    Location
    California
    Posts
    35
    Dont worry!
    I figured it out.. Used the Index method along with MATCH function.
    INDEX('Sheet1A1:C5,MATCH(Sheet2!A1,Sheet1!$A$1:$A$20,0),3)

    Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. naming a column & naming a cell with a number
    By evanzo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-29-2008, 10:49 PM
  2. Using part of a number in another cell
    By UBERMASS in forum Excel General
    Replies: 2
    Last Post: 11-17-2007, 05:44 AM
  3. Merging the correct number of cell rows to fit a string of wrapped text
    By iterature in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-28-2007, 02:15 PM
  4. Variable Cell Number?
    By talR in forum Excel General
    Replies: 1
    Last Post: 06-28-2007, 09:45 AM
  5. Auto generate number???
    By iluminatae in forum Excel General
    Replies: 9
    Last Post: 02-11-2007, 07:43 AM

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