+ Reply to Thread
Results 1 to 7 of 7

Copy the filtered dates, do Formatting and paste it back to filtered column

  1. #1
    Registered User
    Join Date
    10-10-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    48

    Copy the filtered dates, do Formatting and paste it back to filtered column

    Hello Experts,

    I have the dates columns in the sheet name "Dates" where the format of the dates are wrong. I filter the wrong dates to sheet name "Raw Dates" where I have placed formulas that corrects the date format in (col I) and when I'm trying to paste the dates back to same column I am getting debug.

    Not sure which is correct VBA code, below is code and also attaching the excel file for your reference.

    If you have a better option than this, then would be appreciated.

    Please Login or Register  to view this content.

    Regards,
    Rajkumar H
    Attached Files Attached Files

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,474

    Re: Copy the filtered dates, do Formatting and paste it back to filtered column

    Have you considered, formatting the filtered cells,

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-10-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: Copy the filtered dates, do Formatting and paste it back to filtered column

    Hello Dave,
    The correct date format we follow is mm/dd/yyyy but some dates are in dd/mm/yyyy. Hence I filter and copy only the dates in ddmmyyyy format to sheet called Raw dates where I have applied formula which will automatically covert the dates to US format. I have used int() in the raw dates sheet.
    I need to paste the result from I column back to the filtered cell.
    I hope I made u clear.

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,474

    Re: Copy the filtered dates, do Formatting and paste it back to filtered column

    You can't paste into a filtered sheet, the rows would not match, you could loop through them.

  5. #5
    Registered User
    Join Date
    10-10-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: Copy the filtered dates, do Formatting and paste it back to filtered column

    What do you think the best option for this.. do you have a better idea. Because for me the tricky part is to find incorrect format dates. Everything looks similar.

  6. #6
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,474

    Re: Copy the filtered dates, do Formatting and paste it back to filtered column

    Just adding on to your code to replace the dates.

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    10-10-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: Copy the filtered dates, do Formatting and paste it back to filtered column

    Thanks Dave for code, it work great.

    Got to learn something new from you. Thanks again.

    Cheers!
    Raj

+ 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. Copy two column and paste into another ws, with data filtered out
    By psrs0810 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-18-2017, 10:47 AM
  2. Copy and Paste Filtered Excel Column, Only Unique Values
    By EnigmaMatter in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-09-2017, 03:36 PM
  3. Copy from filtered cells and paste to another column
    By floxxie in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 01-07-2015, 07:19 AM
  4. Paste Back to Filtered Sheet or Alternative?
    By coherent in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-25-2013, 08:35 AM
  5. Replies: 3
    Last Post: 08-28-2012, 10:09 AM
  6. Replies: 4
    Last Post: 08-16-2012, 06:20 PM
  7. Issue with copy/paste dates from filtered data
    By deacs in forum Excel General
    Replies: 3
    Last Post: 01-05-2006, 11:10 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