+ Reply to Thread
Results 1 to 17 of 17

match between two sheets baesd on column and copy whole data and insert column(costing)

  1. #1
    Forum Contributor
    Join Date
    01-08-2021
    Location
    Asia
    MS-Off Ver
    2016
    Posts
    292

    match between two sheets baesd on column and copy whole data and insert column(costing)

    hi
    I have two sheets (SUMMARY,DT) . what I want creating the whole data in sheet output with the same headers and borders with formatnumber(#,##.##)
    based on matching the column B into two sheets and the formula in last column shouldn't show when insert the column . with considering data are about 2500 rows for each sheet and the macro should replace data every time run .
    thanks in advance
    Attached Files Attached Files
    Last edited by leap out; 12-21-2021 at 06:04 AM.

  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: match between two sheets baesd on column and copy whole data and insert column(costin

    May we assume the same codes exist on the same row in column B of each sheet, or is this a simple example that doesn't reflect the real layouts?
    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 Contributor
    Join Date
    01-08-2021
    Location
    Asia
    MS-Off Ver
    2016
    Posts
    292

    Re: match between two sheets baesd on column and copy whole data and insert column(costin

    May we assume the same codes exist on the same row in column B of each sheet
    absolutely not . thanks for this notice

    I edited the file with simple changing to be clear .

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: match between two sheets baesd on column and copy whole data and insert column(costin

    .but ALL codes exist in both sheets?
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  5. #5
    Forum Contributor
    Join Date
    01-08-2021
    Location
    Asia
    MS-Off Ver
    2016
    Posts
    292

    Re: match between two sheets baesd on column and copy whole data and insert column(costin

    .but ALL codes exist in both sheets?
    may you explain more ? I don't understand .
    how should match between two sheets based on column B if the codes are not existed in two sheets . as you see there are many multiple columns are not existed in first sheet . how brings missed data for the items when matching ?

  6. #6
    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: match between two sheets baesd on column and copy whole data and insert column(costin

    The question is not about bringing the columns together. We're trying to understand that as well as there being codes common to both sheets, whether there are different codes on the two sheets.

    This is clearly a much simplified example and probably doesn't represent your actual data. We often find that when we give an answer to what is a trivial non representative example when the solution is used with the real world data it doesn't work because of factors like string length and other stuff which is important but hasn't been mentioned.

    Therefore upload your real workbook (or at least a cut down copy), and manually add the results you expect to see. Clearly identify which is original data and which are the results and in a note clearly explain how you have arrived at your results.

    Remember that when you ask a question in a forum those of us who might be able to help know absolutely nothing about your system and work process or the terminology you use. Unless you have uploaded a workbook we know nothing about how it is laid out and little about what you want done with it or how the results should be presented.

    Whilst these things are second nature to you since you live with the workbook all the working day we start with zero knowledge so you need to take us by the hand and explain in quite precise detail your aims and goals as well as stuff like how your data might look different in other situations.
    Don't assume we are able to "figure it out". We're usually quite good but not prescient.

    Put yourself in our position and think about whether what you've posted makes sense and is unambiguous to someone who's never seen it before.
    You are asking us for help so help us to be able to help you by providing all the information we need, even if that information seems obvious or intuitive to you.

  7. #7
    Forum Contributor
    Join Date
    01-08-2021
    Location
    Asia
    MS-Off Ver
    2016
    Posts
    292

    Re: match between two sheets baesd on column and copy whole data and insert column(costin

    @Richard Buttrey
    whether there are different codes on the two sheets
    surely not .
    the same codes have to existed into two sheets .

  8. #8
    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: match between two sheets baesd on column and copy whole data and insert column(costin

    Quote Originally Posted by leap out View Post
    @Richard Buttrey

    surely not .
    the same codes have to existed into two sheets .
    So does that mean the two sheets have exactly the same number of rows?

  9. #9
    Forum Contributor
    Join Date
    01-08-2021
    Location
    Asia
    MS-Off Ver
    2016
    Posts
    292

    Re: match between two sheets baesd on column and copy whole data and insert column(costin

    with considering data are about 2500 rows
    that what I said . with considering the codes are different in location in rows for two sheets as I edited the file .
    what is existed in first sheet in specific row shouldn't be in the same row in the second sheet, but the same code is existed into sheets but different location in row .

  10. #10
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: match between two sheets baesd on column and copy whole data and insert column(costin

    Macro code
    Please Login or Register  to view this content.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  11. #11
    Forum Contributor
    Join Date
    01-08-2021
    Location
    Asia
    MS-Off Ver
    2016
    Posts
    292

    Re: match between two sheets baesd on column and copy whole data and insert column(costin

    @kvsrinivasamurthy may you tell me how your code works? It just shows error #N/A in N1,O1

  12. #12
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: match between two sheets baesd on column and copy whole data and insert column(costin

    Removed by JT.
    Last edited by JohnTopley; 12-22-2021 at 08:05 AM.

  13. #13
    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: match between two sheets baesd on column and copy whole data and insert column(costin

    Have you considered using Power Query to combine the two sets of data?

  14. #14
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: match between two sheets baesd on column and copy whole data and insert column(costin

    Quote Originally Posted by leap out View Post
    @kvsrinivasamurthy may you tell me how your code works? It just shows error #N/A in N1,O1
    Code does not refer to N1 and O1 at all. How you are getting error. Pl see the enclosed file after run of macro.
    Pl upload your file showing error.
    Attached Files Attached Files

  15. #15
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: match between two sheets baesd on column and copy whole data and insert column(costin

    Please Login or Register  to view this content.
    Attached Files Attached Files

  16. #16
    Forum Contributor
    Join Date
    01-08-2021
    Location
    Asia
    MS-Off Ver
    2016
    Posts
    292

    Re: match between two sheets baesd on column and copy whole data and insert column(costin

    @kvsrinivasamurthy thanks again and sorry I said that i can't deal with your code . to understand what I do . I delete the whole data in sheet output and run the macro it shows error as I have already said

  17. #17
    Forum Contributor
    Join Date
    01-08-2021
    Location
    Asia
    MS-Off Ver
    2016
    Posts
    292

    Re: match between two sheets baesd on column and copy whole data and insert column(costin

    @jindon this exactly what I want ! .
    thanks for your assistance

+ 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 data from specific sheets based on headers and insert column
    By Mussa-A in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-26-2021, 11:57 PM
  2. [SOLVED] copy data from multiple sheets to master sheet and insert column to get value
    By MKLAQ in forum Excel Programming / VBA / Macros
    Replies: 27
    Last Post: 03-06-2021, 05:29 AM
  3. Copy and paste rows from data onto sheets that match first column
    By sean.dolan93 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-20-2017, 03:40 PM
  4. Create a sepearte column baesd on the data in other columns
    By jeevan34 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-13-2016, 11:12 AM
  5. Move data over baesd on text in specific column to dashboard
    By Thanks4helping in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-29-2015, 07:18 PM
  6. Copy data from column K to column B if Column C and column I match
    By goog2013 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-20-2013, 12:19 PM
  7. Match column between two sheets and copy row format once column number matches
    By kapil in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-30-2010, 07:54 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