+ Reply to Thread
Results 1 to 10 of 10

Copy a certain value from a row to a another row when code matches

  1. #1
    Registered User
    Join Date
    03-11-2014
    Location
    manila,philippines
    MS-Off Ver
    Excel 2010
    Posts
    39

    Post Copy a certain value from a row to a another row when code matches

    Hello there expert!

    Here comes my problem.

    I got here different vessel name with corresponding vessel code and a amount. I needed to put the amount the to corresponding vessel if it matches the vessel code. Please help me. Further explanation are in the attach excel file.
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Copy a certain value from a row to a another row when code matches

    Hi,

    In G5 copied across and down

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    But can I ask why you don't just enter the amount in the Vessel List Table? What you are doing seems redundant.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 365
    Posts
    2,406

    Re: Copy a certain value from a row to a another row when code matches

    Put in G5, and copied down and cross:

    =IFERROR(IF(INDEX('VESSEL LIST'!$A$4:$A$43,MATCH($E5,'VESSEL LIST'!$B$4:$B$43,0))=G$4,$F5),"")

  4. #4
    Registered User
    Join Date
    03-11-2014
    Location
    manila,philippines
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Copy a certain value from a row to a another row when code matches

    Quote Originally Posted by azumi View Post
    Put in G5, and copied down and cross:

    =IFERROR(IF(INDEX('VESSEL LIST'!$A$4:$A$43,MATCH($E5,'VESSEL LIST'!$B$4:$B$43,0))=G$4,$F5),"")
    Thank You it works really great but is there a possibility to clear / remove if the FALSE result when it didnt match. Thank You

  5. #5
    Registered User
    Join Date
    03-11-2014
    Location
    manila,philippines
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Copy a certain value from a row to a another row when code matches

    Quote Originally Posted by Richard Buttrey View Post
    Hi,

    In G5 copied across and down

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    But can I ask why you don't just enter the amount in the Vessel List Table? What you are doing seems redundant.
    I want to have a code cause i got many vessel and when i do it manually it is very prone to typo error. Thanks

  6. #6
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 365
    Posts
    2,406

    Re: Copy a certain value from a row to a another row when code matches

    Quote Originally Posted by ECYOJ View Post
    Thank You it works really great but is there a possibility to clear / remove if the FALSE result when it didnt match. Thank You
    Don't quite cleat about what you want, if didn't match what results that you want as a results? Is it blanks? or Null?

  7. #7
    Registered User
    Join Date
    03-11-2014
    Location
    manila,philippines
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Copy a certain value from a row to a another row when code matches

    Quote Originally Posted by azumi View Post
    Don't quite cleat about what you want, if didn't match what results that you want as a results? Is it blanks? or Null?
    SOrry if it is unclear. The result that i want when it didnt match is BLANK. Thanks

  8. #8
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 365
    Posts
    2,406

    Re: Copy a certain value from a row to a another row when code matches

    Formula in post#3, give you blank results if error occurs, does that happen?

  9. #9
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 365
    Posts
    2,406

    Re: Copy a certain value from a row to a another row when code matches

    Ooops you right, Please check the file, I change the formula

    Regards
    Attached Files Attached Files

  10. #10
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Copy a certain value from a row to a another row when code matches

    Quote Originally Posted by ECYOJ View Post
    I want to have a code cause i got many vessel and when i do it manually it is very prone to typo error. Thanks
    In that case why not simply use VBA to add the function I gave you. i.e. use the same technique but have it done automatically rather than manually. As a general principle always use standard Excel functionality, (even if you get VBA to do it)

    Must admit I'm somewhat confused though. You say you want code and reject the formula I gave you but seemingly are happy with the very same formula from azumi. Where's the consistency?

+ 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. [SOLVED] copy cell if row matches
    By light in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-08-2013, 08:11 PM
  2. Edit VBA Userform code to run if only 1 entry that matches criteria
    By ExcelFailure in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 07-24-2013, 05:25 AM
  3. [SOLVED] Copy row if value matches 'Sheet'!B1
    By ngocpdn in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-21-2013, 11:54 PM
  4. Copy WHOLE Row if citeria matches
    By HayleyH86 in forum Excel Programming / VBA / Macros
    Replies: 30
    Last Post: 01-24-2013, 09:58 PM
  5. Find matches and copy them
    By MrRogers97 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-02-2011, 02:10 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