+ Reply to Thread
Results 1 to 10 of 10

VBA script to match date and put value as paste special

  1. #1
    Registered User
    Join Date
    05-25-2021
    Location
    Leicester
    MS-Off Ver
    2019 Professional Plus
    Posts
    35

    VBA script to match date and put value as paste special

    Hi,

    I would please appreciate if someone could help me with writing vba script for my below project.

    I basically have two sheet, Data and Summary

    On Data sheet, i have items and their quantities with specific date on top

    On summary sheet, i have items with date range, and index match formula in Cell A1

    I would like to create VBA Script to match date between both sheet and then copy index match formula from Summary sheet A1 and paste on to matching date column on same sheet, after pasting formula i want that column to be change with paste special value.

    Attached is the example file, i would really appreciate if someone could add script on this file and attached back here.

    thank you for help.

    regards

    Nadim
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    08-08-2022
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2019
    Posts
    1,777

    Re: VBA script to match date and put value as paste special

    Hello. It seems to me that your query might be incomplete.

    That is, in the 'Data' sheet: Will it only have dates in column B?...
    You are always very welcome if you add reputation by clicking the * (bottom left) of each message that has helped you.

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

    Re: VBA script to match date and put value as paste special

    In B2 then copied. VBA not required.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  4. #4
    Registered User
    Join Date
    05-25-2021
    Location
    Leicester
    MS-Off Ver
    2019 Professional Plus
    Posts
    35

    Re: VBA script to match date and put value as paste special

    Hi Beyond,

    its it will only have date in column B.

    thanks

  5. #5
    Registered User
    Join Date
    05-25-2021
    Location
    Leicester
    MS-Off Ver
    2019 Professional Plus
    Posts
    35

    Re: VBA script to match date and put value as paste special

    Hi kvsrinivasamurthy,

    This wont resolve my problem, i have not added on example file, but in reality all other column in summary sheet will have pre-filled with numbers, thats is why i required to copy formula from A1 and paste to required column and the whole idea is that after pasting that formula, i want to convert that column with paste special value so that again there is not formula in any of the column.

    hope it make sense.

    thanks

  6. #6
    Valued Forum Contributor
    Join Date
    08-08-2022
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2019
    Posts
    1,777

    Re: VBA script to match date and put value as paste special

    See if the following proposal works for you:
    Attached Files Attached Files

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

    Re: VBA script to match date and put value as paste special

    Try
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by kvsrinivasamurthy; 01-27-2023 at 11:26 AM.

  8. #8
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,295

    Re: VBA script to match date and put value as paste special

    give the attached a trial - macro on button on second sheet - you can extend both ranges and date columns and the macro should work.
    Attached Files Attached Files
    Torachan,

    Mission statement; Promote the use of Tables, Outlaw the use of 'merged cells' and 'RowSource'.

  9. #9
    Registered User
    Join Date
    05-25-2021
    Location
    Leicester
    MS-Off Ver
    2019 Professional Plus
    Posts
    35

    Re: VBA script to match date and put value as paste special

    All works perfect, Thank you so much, @beyond excel, @kvsrinivasamurthy @torachan

  10. #10
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,295

    Re: VBA script to match date and put value as paste special

    thanks for the feedback and added rep point - glad to have helped a neighbour.

+ 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] Finding Match and Paste Values, Script - Not Working; Can someone please check
    By NametobeRenamed in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-26-2019, 06:16 PM
  2. look for today's date and paste special the value
    By olympiaa2010 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-19-2016, 09:49 AM
  3. paste special for date value
    By harishoy in forum Excel General
    Replies: 1
    Last Post: 09-30-2013, 08:42 AM
  4. VBA script problem - Copy and Paste Special data from one sheet to another.
    By akarev in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-05-2013, 12:19 PM
  5. Copy - Paste Special.Values (with extra function) VBA Script needed!
    By Kevin2110 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-19-2011, 10:07 AM
  6. Simple VBA script for match Copy/Paste
    By uniken in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-12-2011, 09:19 AM
  7. Copy / Paste Special Values Script
    By TomTom_BV in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-26-2009, 09:05 AM

Tags for this Thread

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