+ Reply to Thread
Results 1 to 13 of 13

insert three columns and bring the values based on matching with two workbooks

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

    insert three columns and bring the values based on matching with two workbooks

    hello
    I have two workbooks report1,2 contains data should match in COL B,C,D with file OUTPUT Also IN COL B,C,D then inserting three columns and brings the values in COL sales and purchase and calculate in COL QTY i need show the formula in COL QTY and it should summing the values from files each COL SALES AND PURCHASE and add to file OUTPUT and if there are brands are existed in files and not existed in file output should add to file output as highlighted by yellow but when add them should match col A in files with COL A in file output and add it before total
    note : the files in the same folder and may be increase the files also the data in output is increasable in rows I mean in COL A,B,C,D
    I put the result in sheet after and the original data in sheet before but should show the result in sheet1 , and every time run the macro should insert three columns with same borders and formatting also formulas .
    if this is not clear please inform me
    Attached Files Attached Files
    Last edited by leap out; 04-24-2021 at 04:18 AM.

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

    Re: insert three columns and bring the values based on matching with two workbooks

    Please Login or Register  to view this content.

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

    Re: insert three columns and bring the values based on matching with two workbooks

    it's very impressive ! many thanks for astonishing achieving just if it's possible I would mod the formula in QTY when insert the three columns every time insert a new three columns should be the formula as put in COL QTY =QTY in previous COL + purchase in a new column - sales in a new column for more to understand it please check the formula in QTY
    Attached Files Attached Files

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

    Re: insert three columns and bring the values based on matching with two workbooks

    isn't possible?

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

    Re: insert three columns and bring the values based on matching with two workbooks

    any idea to mod the formula ?

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

    Re: insert three columns and bring the values based on matching with two workbooks

    You must clearly explain the difference of the formulae like in the other thread under different user name.

    I really don't want to deal with such lazy poster...

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

    Re: insert three columns and bring the values based on matching with two workbooks

    I thought post#3 is clear when I put the formula in last column in J the idea is when insert a new three columns the last column which calculate the values depends on precede the last column as in sheet result1 last column which calculate the values is G and the precede last column is COL G then when calculate and show the values in COL J= 32+65-25 =77 and if I insert a new three columns as in sheet result2 last column which calculate the values is M and the precede last column is COL J then when calculate and show the values in COL M= 77+65-20 =77 the same thing whit the others rows except TOATL row and every time insert a new three columns the formula should be the precede last column + a new purchase - a new sales
    I hope this help please check two result result1,2
    Attached Files Attached Files
    Last edited by leap out; 04-28-2021 at 04:36 AM.

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

    Re: insert three columns and bring the values based on matching with two workbooks

    Explain why formula in every TOTAL row differs from column by column, row by row??????

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

    Re: insert three columns and bring the values based on matching with two workbooks

    it shows the total for purchases and sales and qty(stock) for each category for instance category for OIL-208L it shows how calculate Total values the purchases and sales and qty in row total , it calculates for each category separately and I've found some cells when I sum them , they're not within the formula , I fixed it and updated the file
    Last edited by leap out; 04-28-2021 at 04:34 AM.

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

    Re: insert three columns and bring the values based on matching with two workbooks

    You must review the workbook for yourself if nobody answer.

    No one want to do such a "GUESS" work and no one but only you know the details of what you are trying to do.

    Please Login or Register  to view this content.
    Last edited by jindon; 04-28-2021 at 05:48 AM.

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

    Re: insert three columns and bring the values based on matching with two workbooks

    thanks and I will take it seruiosly in the future

    suddenly shows this error "invalid use of null ' but if I returns download the files as in post#1 it works normally do you have any idea ?
    HTML Code: 
    last thing , can I show the formula in last column ?

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

    Re: insert three columns and bring the values based on matching with two workbooks

    Formula will only be inserted to the last column each time.
    So the formula other than the last column will be converted to the value.

    Code in my post #10 has been updated.

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

    Re: insert three columns and bring the values based on matching with two workbooks

    thanks for every thing ,my apologies about my post is not clear what I exactly want

+ 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. Find matching value from 2 Columns based on several lokup values
    By FlamingoCup in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 03-30-2020, 09:30 AM
  2. VBA Sum based on matching values in multiple columns
    By TheOneWeDreamOf in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-23-2019, 08:00 PM
  3. [SOLVED] How to highlight a row based on matching values from separate columns
    By MyStix01 in forum Excel General
    Replies: 2
    Last Post: 09-21-2017, 08:43 PM
  4. Align Rows based on Matching Values in 2 Columns
    By cmv040 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-05-2016, 07:49 PM
  5. [SOLVED] VBA to Insert Blank Row based on matching values
    By nirvehex in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-29-2015, 04:36 PM
  6. matching values based on criteria and return values from another columns
    By lizard54 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2012, 11:29 AM
  7. Matching columns of 2 Workbooks and copying the match values to a worksheet.
    By shrimic in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-10-2012, 08:08 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