+ Reply to Thread
Results 1 to 7 of 7

copying information

  1. #1
    Registered User
    Join Date
    04-19-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    10

    copying information

    Thank you to the members that helped on my previous topic, my new problem is a bit different from the last and I have attached a sample of part of system with all important information removed.

    The simple code below is what I was using however the criteria has changed being that the system needs to go to the next empty column and then insert information and look into new work sheet.

    If Sheet1.Range("C3") = "X" Then

    Columns("C:C").Select
    Selection.EntireColumn.Copy

    If Sheet1.Range("C3") = "/" Then
    End Sub
    this is based off this formula that looks at a line of dates and give a True ("X") or False ("/") answer.
    =IF(AND($A$4<=A6,$A$5>=A6),"X","/")



    but this would take a long time wirting code for each column. I written a code which would stop when a cell is not empty but dont know how to intergate the two as well as make it so that it will start on a new worksheet after getting to the final "X".

    Please Login or Register  to view this content.
    Thank you in advance
    Attached Files Attached Files
    Last edited by Paul Johns; 04-23-2010 at 11:37 AM.

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

    Re: copying information

    Try working with this

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-19-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: copying information

    Thank you for that I will try to work with the code you gave me.

  4. #4
    Registered User
    Join Date
    04-19-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: copying information

    I am getting an "Method of range class failed" message could someone point out what I am doing wrong, code below.

    Please Login or Register  to view this content.
    I did try and redefine the worksheet but then got an error message of compile error "Else with out if" message with the following section added.

    Please Login or Register  to view this content.

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

    Re: copying information

    What is supposed to happen?

  6. #6
    Registered User
    Join Date
    04-19-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: copying information

    What is supposed to happen?
    If true ("X") then it should select the column the related defined sheet and then copy it to the activated sheet. I also need it to go to the next define worksheet "next c" and go through the same process. The code at the moment because the code coming up with an error i have not been able to start working on it skip over it data from the previous define worksheet which is in the in the activated worksheet to start on a blank worksheet.
    Last edited by Paul Johns; 04-26-2010 at 04:39 AM.

  7. #7
    Registered User
    Join Date
    04-19-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: copying information

    This link describes what I am trying to do, however I am unable to change the code so that it would work in my example file I posted.

    The code is below;-

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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