• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA to copy data from a sheet1 and sheet2 to different tabs

Hi,
I have amounts in Sheet1 ‘column D’ and Sheet2 ‘column C’, I want to copy and paste the amount in following tabs in column B and column F with the below criteria.

Criteria to be match is date and plan ID (Which is in H1 in all tabs).

Thank you so much in advance
 

Attachments

  • GGI - Daily Earnings.xlsx
    702.1 KB · Views: 18
Hello,
you wanted to paste data as follows:
Sheet1 ‘column D’ = column B in all sheets
Sheet2 ‘column C’ = column F in all sheets
 
See attached and button on Sheet1.
It still needs tidying up regarding the dates; your dates are all 6192019 which I take means 19th June 2019, but what do the likes of
6th June 2019 and 6th November 2019 look like on Sheet1 and Sheet2?
If there are existing data in the destination cells they will be overwritten without warning.
 

Attachments

  • Chandoo41962GGI - Daily Earnings.xlsm
    719.2 KB · Views: 3
See attached and button on Sheet1.
It still needs tidying up regarding the dates; your dates are all 6192019 which I take means 19th June 2019, but what do the likes of
6th June 2019 and 6th November 2019 look like on Sheet1 and Sheet2?
If there are existing data in the destination cells they will be overwritten without warning.
I am sorry date format was wrong in the file it will be MM/DD/YYYY in both sheets.
 
Could you re-attach the file? Just so that I'm clear whether these are text or actual dates, and so that I'm sure it'll work.
 
Last edited:
Here is the file. And the column B and F should not be blank for particular date .. It should the value from Sheet1 and Sheet2 else Zero
 

Attachments

  • GGI - Daily Earnings.xlsx
    702 KB · Views: 5
And the column B and F should not be blank for particular date .. It should the value from Sheet1 and Sheet2 else Zero
Can I assume:
1. There's only ever 1 date, the same date, in all the rows in sheet1 and sheet2? This will makes things easier.
2. ALL the Plan ID sheets, if they don't appear in Sheet 1 and/or Sheet2 will have zero for that date? (You don't want me to set all the dates on all the sheets to zero.)
 
Last edited:
Can I assume:
1. There's only ever 1 date, the same date, in all the rows in sheet1 and sheet2? This will makes things easier.
2. ALL the Plan ID sheets, if they don't appear in Sheet 1 and/or Sheet2 will have zero for that date? (You don't want me to set all the dates on all the sheets to zero.)
1. Yes there will be same date in all the rows in sheet1 and sheet2
2. Yes, if they don't appear in Sheet 1 and/or Sheet2 will have zero for that date. Setting zero on all dates will look odd so i dont like to go for the alternative
 
That selected Plan ID (99339326) (sitting in cell A27 of both Sheets Sheet1 and Sheet2) doesn't exist on any other sheet, so I thought I'd alert the user to that fact.
 
The other way around!
Plan ID 99339326 doesn't exist in any cell H1 of any sheet at all, but it does exist in Sheets Sheet1 and Sheet2.
 
Back
Top