+ Reply to Thread
Results 1 to 5 of 5

Consolidating an offsetting code

  1. #1
    Registered User
    Join Date
    08-28-2008
    Location
    Oregon
    Posts
    3

    Consolidating an offsetting code

    I am working on a code to transfer data from one sheet to another, but there are 75 lines that I am transfering.

    The basics of the code is:

    Please Login or Register  to view this content.
    How do I make this loop 75 times.

    I'm thinking it should be as easy as specifying a set number of times to loop, and in each loop have it at i+1 or something like that.

    It works if I type it out 75 times, but then I look at a wall of text.

    Any tips would be appriciated.
    Last edited by Actwentysix; 08-28-2008 at 01:33 PM. Reason: Changing title and adding code tags

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    Hi, and welcome to the forum.

    Please take a moment to read the rules and guidelines. Thread subjects should be meaningful, and code should be wrapped with code tags.

    'This should be easy' does not describe the problem and will not assist you in receiving replies. Please edit and correct this post and I'm sure someone will be along to assist.

    Rgds

  3. #3
    Registered User
    Join Date
    08-28-2008
    Location
    Oregon
    Posts
    3

    Update

    After a bit more research on the subject, I believe to have found the answer:

    Please Login or Register  to view this content.
    And that seems to be getting the job done for me.

    It's alot easier to manipulate the one line of text rather than the entire wall.

  4. #4
    Registered User
    Join Date
    08-28-2008
    Location
    Oregon
    Posts
    3
    It didn't work quite how I was needing, so if any of you have looked at this and have a word of advice.

    After closer examination, the code I had used, wasn't exactly the code I posted above. so I reworked it a bit and have come up with the following solution, however, it doesn't seem to be working, and is giving me a mismatch error.

    The following is the code that produces the error:

    Please Login or Register  to view this content.
    However, the following does work and I have used it successfully in the same workbook:

    Please Login or Register  to view this content.
    I'm not seeing the difference in why the former code is not working.

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    Hi,

    Probably because the values in column J on sheets 1 & 2 are not consistent. i.e. do you have numbers in one column, and non numeric text values, i.e. strings in the other?

    HTH

+ 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. it is probably so easy but help needed!
    By student87 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-27-2008, 07:04 AM
  2. Copy worksheet - Easy?
    By brad.tho in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-07-2008, 04:51 AM
  3. counting question
    By Hammy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-15-2008, 03:05 PM
  4. The next number should be easy
    By Southernw2002 in forum Excel General
    Replies: 2
    Last Post: 11-27-2007, 10:29 AM
  5. easy excel question
    By ness80 in forum Excel General
    Replies: 5
    Last Post: 01-22-2007, 02:05 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