+ Reply to Thread
Results 1 to 7 of 7

if...

  1. #1
    Forum Contributor
    Join Date
    06-05-2006
    Posts
    166

    if...

    I need cells to automatically update when other cells have text inserted. I have some data on sheet 2 in columns 1 and 2. On sheet 1 when the text that matches the text on sheet 2 is entered I want the corresponding text from sheet 2 column two to be inserted. Some of my data is prefixed with '. Thanks for any help!

  2. #2
    Toppers
    Guest

    RE: if...

    In cells in Sheet1:

    =IF(ISERROR(VLOOKUP(A1,Sheet2!$A$1:$B$100,2,0)),"",(VLOOKUP(A1,Sheet2!$A$1:$B$100,2,0)))

    Copy down as far as required. Cells remain blank until text is entered OR no
    match is found.

    Adjust ranges on Sheet2 to suit.

    HTH

    "phil2006" wrote:

    >
    > I need cells to automatically update when other cells have text
    > inserted. I have some data on sheet 2 in columns 1 and 2. On sheet 1
    > when the text that matches the text on sheet 2 is entered I want the
    > corresponding text from sheet 2 column two to be inserted. Some of my
    > data is prefixed with '. Thanks for any help!
    >
    >
    > --
    > phil2006
    > ------------------------------------------------------------------------
    > phil2006's Profile: http://www.excelforum.com/member.php...o&userid=35092
    > View this thread: http://www.excelforum.com/showthread...hreadid=559849
    >
    >


  3. #3
    Naveen
    Guest

    RE: if...

    Dear Phil,

    u can use lookup function to do this. This is simplest way to do.

    Eg: insert this formula in sheet1, column 2.
    =LOOKUP(A1,Sheet2!a:a,Sheet2!b:b)
    A1- Data on Sheet1.
    sheet2!a:a- where the reference data on sheet1 should match with the data in
    sheet2!(column1)
    sheet2!b:b- is the corresponding data to the column1 in sheet2.

    Hope i am clear.

    Naveen

    "phil2006" wrote:

    >
    > I need cells to automatically update when other cells have text
    > inserted. I have some data on sheet 2 in columns 1 and 2. On sheet 1
    > when the text that matches the text on sheet 2 is entered I want the
    > corresponding text from sheet 2 column two to be inserted. Some of my
    > data is prefixed with '. Thanks for any help!
    >
    >
    > --
    > phil2006
    > ------------------------------------------------------------------------
    > phil2006's Profile: http://www.excelforum.com/member.php...o&userid=35092
    > View this thread: http://www.excelforum.com/showthread...hreadid=559849
    >
    >


  4. #4
    Naveen
    Guest

    RE: if...

    just to remind u if Vlookup is used the data should be in ascending order.

    "Toppers" wrote:

    > In cells in Sheet1:
    >
    > =IF(ISERROR(VLOOKUP(A1,Sheet2!$A$1:$B$100,2,0)),"",(VLOOKUP(A1,Sheet2!$A$1:$B$100,2,0)))
    >
    > Copy down as far as required. Cells remain blank until text is entered OR no
    > match is found.
    >
    > Adjust ranges on Sheet2 to suit.
    >
    > HTH
    >
    > "phil2006" wrote:
    >
    > >
    > > I need cells to automatically update when other cells have text
    > > inserted. I have some data on sheet 2 in columns 1 and 2. On sheet 1
    > > when the text that matches the text on sheet 2 is entered I want the
    > > corresponding text from sheet 2 column two to be inserted. Some of my
    > > data is prefixed with '. Thanks for any help!
    > >
    > >
    > > --
    > > phil2006
    > > ------------------------------------------------------------------------
    > > phil2006's Profile: http://www.excelforum.com/member.php...o&userid=35092
    > > View this thread: http://www.excelforum.com/showthread...hreadid=559849
    > >
    > >


  5. #5
    Naveen
    Guest

    RE: if...

    just to remind u if Vlookup is used the data should be in ascending order.

    "Toppers" wrote:

    > In cells in Sheet1:
    >
    > =IF(ISERROR(VLOOKUP(A1,Sheet2!$A$1:$B$100,2,0)),"",(VLOOKUP(A1,Sheet2!$A$1:$B$100,2,0)))
    >
    > Copy down as far as required. Cells remain blank until text is entered OR no
    > match is found.
    >
    > Adjust ranges on Sheet2 to suit.
    >
    > HTH
    >
    > "phil2006" wrote:
    >
    > >
    > > I need cells to automatically update when other cells have text
    > > inserted. I have some data on sheet 2 in columns 1 and 2. On sheet 1
    > > when the text that matches the text on sheet 2 is entered I want the
    > > corresponding text from sheet 2 column two to be inserted. Some of my
    > > data is prefixed with '. Thanks for any help!
    > >
    > >
    > > --
    > > phil2006
    > > ------------------------------------------------------------------------
    > > phil2006's Profile: http://www.excelforum.com/member.php...o&userid=35092
    > > View this thread: http://www.excelforum.com/showthread...hreadid=559849
    > >
    > >


  6. #6
    Forum Contributor
    Join Date
    06-05-2006
    Posts
    166
    Thanks, that's just what I needed! How would I write this as a macro that could be used in a number of sheets and would only be inserted into the cells if there was something inserted in the data column. i.e. if the initial column is empty the corresponding cell remains empty.

    Thanks very much.

  7. #7
    Dave Peterson
    Guest

    Re: if...

    Not always.

    Toppers looks for an exact match (that 4th argument is 0 or false).

    Naveen wrote:
    >
    > just to remind u if Vlookup is used the data should be in ascending order.
    >
    > "Toppers" wrote:
    >
    > > In cells in Sheet1:
    > >
    > > =IF(ISERROR(VLOOKUP(A1,Sheet2!$A$1:$B$100,2,0)),"",(VLOOKUP(A1,Sheet2!$A$1:$B$100,2,0)))
    > >
    > > Copy down as far as required. Cells remain blank until text is entered OR no
    > > match is found.
    > >
    > > Adjust ranges on Sheet2 to suit.
    > >
    > > HTH
    > >
    > > "phil2006" wrote:
    > >
    > > >
    > > > I need cells to automatically update when other cells have text
    > > > inserted. I have some data on sheet 2 in columns 1 and 2. On sheet 1
    > > > when the text that matches the text on sheet 2 is entered I want the
    > > > corresponding text from sheet 2 column two to be inserted. Some of my
    > > > data is prefixed with '. Thanks for any help!
    > > >
    > > >
    > > > --
    > > > phil2006
    > > > ------------------------------------------------------------------------
    > > > phil2006's Profile: http://www.excelforum.com/member.php...o&userid=35092
    > > > View this thread: http://www.excelforum.com/showthread...hreadid=559849
    > > >
    > > >


    --

    Dave Peterson

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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