+ Reply to Thread
Results 1 to 12 of 12

if in worksheet "test1" is in cell G2 to G1000 an entry"share sale" copy the row new sheet

  1. #1
    Registered User
    Join Date
    08-27-2015
    Location
    Friedberg
    MS-Off Ver
    2010
    Posts
    68

    if in worksheet "test1" is in cell G2 to G1000 an entry"share sale" copy the row new sheet

    Hi all,

    in worksheet "test1" I insert new forms. I use cell a to g.
    If in cell G2 to G1000 is an entry "share sale" I have to copy the complete line A to G
    in another worksheet with the Name "Sale"Žin to the next free line.

    Have anybody an idea how to write this VBA?

    Kind regards,

    Thorsten

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: if in worksheet "test1" is in cell G2 to G1000 an entry"share sale" copy the row new s

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    08-27-2015
    Location
    Friedberg
    MS-Off Ver
    2010
    Posts
    68

    Re: if in worksheet "test1" is in cell G2 to G1000 an entry"share sale" copy the row new s

    Hi, that is fine. One Question: What I have to add if the copied lines have to be deleted in the sheet "test1"?

    Kind regards,
    Thorsten

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: if in worksheet "test1" is in cell G2 to G1000 an entry"share sale" copy the row new s

    Try:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    08-27-2015
    Location
    Friedberg
    MS-Off Ver
    2010
    Posts
    68

    Re: if in worksheet "test1" is in cell G2 to G1000 an entry"share sale" copy the row new s

    Thank you. It works fine.

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: if in worksheet "test1" is in cell G2 to G1000 an entry"share sale" copy the row new s

    You're welcome. Glad to help out and thanks for the feedback.

  7. #7
    Registered User
    Join Date
    08-27-2015
    Location
    Friedberg
    MS-Off Ver
    2010
    Posts
    68

    Re: if in worksheet "test1" is in cell G2 to G1000 an entry"share sale" copy the row new s

    Hi John,
    I made 6 different Codes (Sale, Enroll, Change, Stop, Restart, Cancellation) and they work fine.
    The only thing is if I have for example no "Change" in sheet "test1" and run the code, I get an error message "No cells were found"
    I think this happens in the line with the "Auto filter".
    Is there any chance that the code don't run the Auto filter and search for lines to delete if "Change" not exists?

    Kind regards, Thorsten

  8. #8
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: if in worksheet "test1" is in cell G2 to G1000 an entry"share sale" copy the row new s

    Try:

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    08-27-2015
    Location
    Friedberg
    MS-Off Ver
    2010
    Posts
    68

    Re: if in worksheet "test1" is in cell G2 to G1000 an entry"share sale" copy the row new s

    Perfect. This is very helpful and a good training for me. Last Question: If i would like to select two different "keywords", for example "share sale" and "cancellation". Is it very complicated?

  10. #10
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: if in worksheet "test1" is in cell G2 to G1000 an entry"share sale" copy the row new s

    No, try:

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    08-27-2015
    Location
    Friedberg
    MS-Off Ver
    2010
    Posts
    68

    Re: if in worksheet "test1" is in cell G2 to G1000 an entry"share sale" copy the row new s

    Perfect. Thank you very much. Great help.
    Kind regards, Thorsten

  12. #12
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: if in worksheet "test1" is in cell G2 to G1000 an entry"share sale" copy the row new s

    Again welcome and glad to help out.

+ 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. If Sheet("Entry").range("P3") has not today date then run macro
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-20-2016, 12:13 PM
  2. Replies: 1
    Last Post: 01-22-2016, 09:21 AM
  3. Looping thru rows and copy cell values from "Inputs" sheet to "Output" sheet
    By hariexcel1987 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-02-2015, 11:32 PM
  4. "Worksheet change" not changing cell on other sheet to match target cell "fill".
    By Ochimus in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-02-2015, 12:02 PM
  5. Replies: 3
    Last Post: 06-05-2015, 01:55 PM
  6. [SOLVED] Data validation: allow entry into a cell if other three cells have "X", "Y" and "Z"?
    By RogerRangeRover in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-05-2013, 04:49 AM
  7. [SOLVED] "Subscript out of range" error for: Workbooks("Test1.xls").Save
    By Just12341234 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-17-2005, 11: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