+ Reply to Thread
Results 1 to 4 of 4

VBA automatically Cut and Past (cut and past it into the different work sheet)

  1. #1
    Registered User
    Join Date
    09-15-2015
    Location
    england
    MS-Off Ver
    2013
    Posts
    19

    VBA automatically Cut and Past (cut and past it into the different work sheet)

    Screenshot 2016-03-31 21.02.17.png
    Screenshot 2016-03-31 21.35.16.png

    hi i have got 12 work sheet names as the months of the year from Apr to Mar each work sheet from Column "A" to "AE" and Row 1260 to 2000
    Column "B" is the sold date i want it when i put the date automatically cut the row from "A" to "X" and past it to the right work sheet
    example
    i have bought a car in April i have put all the data in work sheet Apr and sold it in July when i tape the date in sold date Column 04/07/16 the row from "A" to "X" cut and past it in work sheet Jul in the next available row from 1260 to 2000
    but i have got a formula in Column "K","P" and "V" will be ("A" to "X" - "K","P"and "V") if there is any way to skip "K","P"and"V"

    i have got a VBA Code does exactly what i want but got different range

    Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
    Dim dt As String
    If Target.Cells.Count > 1 Then Exit Sub
    If Len(Sh.Name) <> 3 Then Exit Sub
    Application.EnableEvents = False
    If Not Intersect(Target, Range("C3", Cells(Rows.Count, 3).End(xlUp))) Is Nothing Then
    dt = Format(Range("C" & Target.Row).Value, "mmm")
    Sh.Range("A" & Target.Row).Resize(1, 9).Copy
    Sheets(dt).Cells(Rows.Count, 1).End(xlUp)(2).PasteSpecial xlPasteValues
    Sh.Range("A" & Target.Row).Resize(1, 9).ClearContents
    End If
    Application.EnableEvents = True
    End Sub

    if there is any thing not clear please ask me
    thank you
    Last edited by seifeddine87; 03-31-2016 at 05:14 PM.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: VBA automatically Cut and Past (cut and past it into the different work sheet)

    A couple of small changes:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    09-15-2015
    Location
    england
    MS-Off Ver
    2013
    Posts
    19

    Re: VBA automatically Cut and Past (cut and past it into the different work sheet)

    workes perfect i do appreciated xladept and a lot of respect

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: VBA automatically Cut and Past (cut and past it into the different work sheet)

    This is the correct version Thanks again for the rep. AND, don't forget to mark them both Solved

+ 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] Can't scroll down past row 260, or past column Y in Excel 2003....
    By damianberry in forum Excel General
    Replies: 2
    Last Post: 12-11-2012, 01:00 AM
  2. Replies: 4
    Last Post: 11-20-2012, 05:25 PM
  3. [SOLVED] Calculate total dollar amount the is past the past due date
    By Barb1980 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-12-2012, 05:34 PM
  4. Replies: 2
    Last Post: 09-04-2012, 01:19 AM
  5. Automatically move past due projects
    By Wes.T.S in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-20-2011, 01:40 PM
  6. Copy and Past to Differerent Work Sheet
    By Terry in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-07-2005, 04:05 PM
  7. Past Value automatically
    By TM in forum Excel General
    Replies: 2
    Last Post: 01-06-2005, 02:06 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