+ Reply to Thread
Results 1 to 12 of 12

email and copy data to another sheet in matching row

  1. #1
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Red face email and copy data to another sheet in matching row

    Hi,
    I have been helped by many experts and Gurus to arrive at this code. Mainly thanks to JB Sir. I have further modified it.
    Now I need further help please.
    Present code works fine for sending email, saving it as PDF etc..

    My main concern is copying some of the cells and pasting them to another sheet as text, but with a twist. Please see red text below where I need help..

    Please Login or Register  to view this content.
    I want sheet1 range C68:I68 copied as text to sheet2 , however in sheet1 B68 is today's date and sheet2 range A:A is having all dates starting from 01 Jan to 31 Dec.
    So I want to modify the code in such a manner that C68:I68 is copied from sheet1 and pasted to range B:I against corresponding date in sheet2 .
    It means it will:
    First copy C68:I68
    Then look for matching date of B68 of sheet1, in column A of sheet2
    Then paste B68:I68 into sheet2 range B:H, against the matching row which has the same date as B68.

    Hope I have been able to explain it correctly.

    Many thanks
    Regards

  2. #2
    Valued Forum Contributor wenqq3's Avatar
    Join Date
    04-01-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    868

    Re: email and copy data to another sheet in matching row

    Please Login or Register  to view this content.
    I hope this work for you, if no okie. Perhaps a sample workbook explain more.
    -If the problem is solved, please mark your thread as Solved: Click Thread Tools above your first post, select "Mark your thread as Solved".

    -Always upload a workbook before start your question
    To attach a file, push the button with the paperclip (or scroll down to the Manage Attachments button), browse to the required file, and then push the Upload button.

    +++ If my answer(s) helped you, please add me reputation by click on * +++

  3. #3
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: email and copy data to another sheet in matching row

    Thanks Wenqq3,
    I will try and get back
    Regards

  4. #4
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: email and copy data to another sheet in matching row

    Hi,
    So far so good.
    It is copying alright but pasting it to right place seems difficult. It simply will not do it.
    Please Login or Register  to view this content.
    We are close.... but little away from getting it right.

    What do you say?
    Thanks
    regards

  5. #5
    Valued Forum Contributor wenqq3's Avatar
    Join Date
    04-01-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    868

    Re: email and copy data to another sheet in matching row

    Can you upload a sample file. With those data. Sheet 1 C68:I68, Sheet2 date.
    Remove those sensitive data.

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: email and copy data to another sheet in matching row

    I do not know the other parts of the code, but for the red part, these should do.

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: email and copy data to another sheet in matching row

    Hi,
    Apology for a late reply. I was trying various combinations, however the above suggested codes and my combination did not work as intended.
    I have now adapted a another approach, and its more simple than the one before.
    Email part is good, so I am not changing it.
    Only copying part is now changed , where I need your help.
    This extension of code will be after email part...

    Please Login or Register  to view this content.

  8. #8
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: email and copy data to another sheet in matching row

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: email and copy data to another sheet in matching row

    Thanks Great . It works fine by itself....
    Now how do I combine with email code??

    That is after the last line of email code ' Display 'or use .Send
    Really great work. Thanks
    Regards

  10. #10
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: email and copy data to another sheet in matching row

    I do not know where you put it in. I could not test it.

    Please Login or Register  to view this content.
    Last edited by AB33; 07-18-2013 at 11:27 AM.

  11. #11
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: email and copy data to another sheet in matching row

    It works like a magic now.
    I have learnt the mistakes that I was making..... Silly though
    My words will short to thank you.
    Many thanks
    Regards

  12. #12
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: email and copy data to another sheet in matching row

    Hi wenqq3 & AB33,
    Once again thanks for your support and great help.
    I have clicked * for you to thank you
    Regards

+ 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] Userform for date entry and then copy/paste matching data to another sheet
    By nymanns in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-06-2013, 03:22 AM
  2. Replies: 2
    Last Post: 04-11-2013, 11:14 AM
  3. [SOLVED] copy data from one sheet to an other by matching Names
    By Aranell in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-16-2012, 06:40 AM
  4. Copy Paste data with matching criteria from different sheet
    By Noor Hussain in forum Excel General
    Replies: 0
    Last Post: 06-14-2012, 01:23 AM
  5. vba matching columns of data and copy/pasting to new row on different sheet
    By maybefrog in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-27-2011, 07:36 PM

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