+ Reply to Thread
Results 1 to 11 of 11

How to get corresponding values from another sheet-excel 2003

  1. #1
    Registered User
    Join Date
    05-04-2010
    Location
    Middle East
    MS-Off Ver
    Excel 2003
    Posts
    7

    How to get corresponding values from another sheet-excel 2003

    Dear Friends!

    Am a new member. I have a query and it is as follows :

    In Sheet1
    Column A
    Green
    Green
    Orange
    Green
    Brown
    White

    etc

    In Sheet 2

    Column A
    ColumnB
    Green 1
    Orange 2
    White 3
    Brown 4

    I need in Sheet 1

    ColumnA ColumnB
    Green 1
    Green 1
    Orange 2
    Green 1
    Brown 4
    White 3

  2. #2
    Registered User
    Join Date
    05-04-2010
    Location
    Middle East
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: How to get corresponding values from another sheet-excel 2003

    Thanks in advance!

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: How to get corresponding values from another sheet-excel 2003

    You can use SUMIF

    Sheet1!B1:
    =SUMIF(Sheet2!$A:$A,$A1,Sheet2!$B:$B)
    copied down

    change , to ; pending your local delimiters - Middle East is quite vague - most nations in that region would use ; rather than ,

    You could also use VLOOKUP but SUMIF is perhaps preferable in so far as it will return 0 if the value in A is not found on Sheet2 rather than an #N/A error.

  4. #4
    Registered User
    Join Date
    05-04-2010
    Location
    Middle East
    MS-Off Ver
    Excel 2003
    Posts
    7

    Thumbs up Re: How to get corresponding values from another sheet-excel 2003

    Quote Originally Posted by DonkeyOte View Post
    You can use SUMIF

    Sheet1!B1:
    =SUMIF(Sheet2!$A:$A,$A1,Sheet2!$B:$B)
    copied down

    change , to ; pending your local delimiters - Middle East is quite vague - most nations in that region would use ; rather than ,

    You could also use VLOOKUP but SUMIF is perhaps preferable in so far as it will return 0 if the value in A is not found on Sheet2 rather than an #N/A error.

    thanks a lot for the quick reply dear friend!

    i initially tried vlookup, it did not serve the purpose.

    thanks a lot!

  5. #5
    Registered User
    Join Date
    05-04-2010
    Location
    Middle East
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: How to get corresponding values from another sheet-excel 2003

    Another help needed with regards to the same query! Could anyone kindly help me??

    In Sheet1


    Column A

    Green
    Green
    Orange
    Green
    Brown
    White

    etc

    In Sheet 2

    Column A ColumnB
    1 Green
    2 Orange
    3 White
    4 Brown

    I need in Sheet 1

    Column A ColumnB
    1 Green
    1 Green
    2 Orange
    1 Green
    4 Brown
    3 White
    Last edited by dolphin; 05-04-2010 at 05:30 AM.

  6. #6
    Registered User
    Join Date
    05-04-2010
    Location
    Middle East
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: How to get corresponding values from another sheet-excel 2003

    i tried SUMIF , but it did not work!

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: How to get corresponding values from another sheet-excel 2003

    sounds almost like homework... in this case VLOOKUP would be a logical approach (SUMIF not so given it returns a numeric value)

  8. #8
    Registered User
    Join Date
    05-04-2010
    Location
    Middle East
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: How to get corresponding values from another sheet-excel 2003

    Quote Originally Posted by DonkeyOte View Post
    sounds almost like homework... in this case VLOOKUP would be a logical approach (SUMIF not so given it returns a numeric value)
    am sorry for bothering!

    infact i tried vlookup, it give me #NA. and in this case SUMIF did not work too!


  9. #9
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: How to get corresponding values from another sheet-excel 2003

    Why would you expect SUMIF to work given your intent is to return a text string ?

    If you're getting #N/A with VLOOKUP then you need to validate your criteria values against those in the table_array (same data type ? leading / trailing spaces etc...)

  10. #10
    Registered User
    Join Date
    05-04-2010
    Location
    Middle East
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: How to get corresponding values from another sheet-excel 2003

    Quote Originally Posted by DonkeyOte View Post
    Why would you expect SUMIF to work given your intent is to return a text string ?

    If you're getting #N/A with VLOOKUP then you need to validate your criteria values against those in the table_array (same data type ? leading / trailing spaces etc...)


    ok! thanks a lot !!

    am not very good with formulae!

  11. #11
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: How to get corresponding values from another sheet-excel 2003

    nor reading the Rules it seems... as per the note at MrExcel.com - if you opt to cross post you must provide links accordingly:

    http://www.mrexcel.com/forum/showthread.php?t=465813

    this saves people wasting their time and also reduces the risk of your posting rights being revoked.

+ 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