+ Reply to Thread
Results 1 to 4 of 4

VBA copy paste a selection then find the current date and copy this selection row 61

  1. #1
    Registered User
    Join Date
    07-08-2015
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    2

    VBA copy paste a selection then find the current date and copy this selection row 61

    Hi
    first time i ask a question here, I am a beginer in VBA and need some help!!

    I have a workbook with my macros

    I want to get the updated information from another file sheet "raw"

    open this file
    then copy from raw sheet selection B1:B87 (this is fixed all the time)

    then search my variable (Current_Date) in my open workbook in "Daily Input" sheet (has multiple daily columns, on top daily date (2015-09-10) and under in rows all the data i need to copy paste from the other file.
    But need to copy the selection B1:B87 under the Current_date to row 61 to 147.

    I hope someone can help me

    thank you very much
    Merci

    Caroline

  2. #2
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: VBA copy paste a selection then find the current date and copy this selection row 61

    Hi
    Quote Originally Posted by woocaro View Post
    ....
    I have a workbook with my macros
    I want to get the updated information from another file sheet "raw"
    open this file
    then copy from raw sheet selection B1:B87 (this is fixed all the time)
    then search my variable (Current_Date) in my open workbook in "Daily Input" sheet (has multiple daily columns, on top daily date (2015-09-10) and under in rows all the data i need to copy paste from the other file.
    But need to copy the selection B1:B87 under the Current_date to row 61 to 147.......
    Although you have explained well, . It would be much easier for someone trying to help if you give a clear picture ( Not IMAGES ) of what you have before and what you want after with reduced test data.

    . So simply provide a clear before and after ... ( For example a "Before" and "After" sheet in an Excel File )

    To summarise.

    . The Before or Befores, should look just as it / they does before running of any macro.
    .
    . The After or Afters, should be hand filled by you so that it they / looks exactly as you want it to After running of any macro, based on the actual sample data in the Before / or Befores
    . Make sure there is just enough data to demonstrate your need. Remember to desensitize the data if necessary, but use the typical Format type and choose your data carefully so that it can be used to test all possible scenarios.
    ...


    Alan

    P.s. some ways to provide that info: ( Most people use . 2a )
    . 1 ) use the Forum Tools in my signature to produce screen shots we can copy to a spreadsheet ( NO IMAGES ! )
    . 2 ) Post Files
    . 2 a) To Attach a sample workbook:
    View Pic
    http://www.excelforum.com/members/da...ch-a-file.html
    http://tinyurl.com/oenwprw
    . 2 b) Send over a file sharing site, such as this free thing
    Box Net,
    https://www.box.com/
    http://tinyurl.com/7chr7u8
    . Remember to select Share and give the link / links they give..

    . 3 ) - Up left in the Thread editor is a Table icon. Click that, create an appropriately sized table and fill it in. (To get the table icon up in the Reply window you may need to click on the “Go Advanced” Button next to the Reply Button)

    . 4) Only as a very last resort, P.M. me and i will reply with my Email Addressee so you can send me a file
    ** To PM me, click on my name in the left hand margin when you are logged in, the rest should be obvious.
    '_- Google first, like this _ site:ExcelForum.com Gamut
    Use Code Tags: Highlight code; click on the # icon above,
    Post screenshots COPYABLE to a Spredsheet; NOT IMAGES PLEASE
    http://www.excelforum.com/the-water-...ml#post4109080
    https://app.box.com/s/gjpa8mk8ko4vkwcke3ig2w8z2wkfvrtv
    http://excelmatters.com/excel-forums/ ( Scrolll down to bottom )

  3. #3
    Registered User
    Join Date
    07-08-2015
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    2

    Re: VBA copy paste a selection then find the current date and copy this selection row 61

    Finally, i have asked one of the best guy here on vba,
    he resolved my issue and i will let you know in the code

    first part missing is the valeur_cherchee, need to be set as Date
    then that valeur_cherchee need the code CDate (to convert in date if not it will be a string and it my code it wasnt seeing the date)

    Dim Trouve As Range, AdresseTrouvee As String
    Dim Valeur_Cherchee As Date
    Dim FileName As String

    Valeur_Cherchee = CDate(Worksheets("Base").Range("C1").Value)


    all working now.

    thank you Doc.AElstein for letting me know how to do proper asking of question on the site.

    Caroline

  4. #4
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: VBA copy paste a selection then find the current date and copy this selection row 61

    Hi
    Quote Originally Posted by woocaro View Post
    Finally, i have asked one of the best guy here on vba,
    he resolved my issue and i will let you know in the code...
    Thanks for letting us know
    Alan

    P.s.

    Please mark the Thread as solved, thanks

    ThreadSolved.JPG

+ 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. Using current month selection to copy/paste formulas and values
    By gigi85 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-03-2014, 07:51 AM
  2. [SOLVED] Copy a static row and Insert it below current selection
    By Chris S. in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-07-2013, 11:59 PM
  3. copy current selection
    By anilg0001 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-09-2013, 04:48 AM
  4. copy current selection
    By anilg0001 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-09-2013, 04:26 AM
  5. Copy selection, paste to second ws, date stamp.
    By xxxombie88 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-08-2013, 05:58 PM
  6. Copy/Paste Data from Row to Another Sheet if Selection Made from Drop down Menu
    By bufb45 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-13-2012, 12:47 PM
  7. Problem with Selection find, offset, copy & paste Macro
    By MDResearcher in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 06-21-2011, 05:51 PM
  8. [SOLVED] find date and copy selection
    By redb in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-31-2006, 07:35 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