+ Reply to Thread
Results 1 to 3 of 3

Moving data with varies in length

  1. #1
    Registered User
    Join Date
    09-29-2015
    Location
    Auburn Hils
    MS-Off Ver
    2013
    Posts
    2

    Moving data with varies in length

    Hi,

    my code is already working, but unfortunately only at the example where I created it form.

    The problem is the the length of the columns varies because the data are measurements.

    This causes that an error occurs where it says that the selected data length doesn't fit.

    I choose the data blocks with shift+strg+down and shift+strg+right which creates the codes
    Please Login or Register  to view this content.
    . This should be fine so far, but then the next code is
    Please Login or Register  to view this content.
    , what might be the problem because it is not flexible and just belongs to the file in which I created the macro in.

    I am very new with VBA and would be very glad for any help.

    I attached a picture which explains, what I am looking for. The Position of A and B is always the same. C1 and C2 varies. The gap between C1 and C2 is constant as well.

    As I mentioned, my code works already, but not in generavorher nachher.pngl, yet.

    whole code

    Please Login or Register  to view this content.
    Thank

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,371

    Re: Moving data with varies in length

    Probably best to post a sample workbook with some typical data so the problem can be seen in context.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    09-29-2015
    Location
    Auburn Hils
    MS-Off Ver
    2013
    Posts
    2

    Re: Moving data with varies in length

    The files are too big. I made them a lot smaller I guess it should work as well.


    I just need to know how to select the selected columns and rows in general and not with Selection.
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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] Copy Data from one sheet and paste the consolidated data into another (Data Range Varies)
    By kittu55 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-13-2013, 10:02 PM
  2. Extracting a number from a string that varies in length...
    By lucraft in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-01-2012, 11:30 AM
  3. Using one cell to specify the length of a moving average
    By Paulthenovice in forum Excel General
    Replies: 7
    Last Post: 12-04-2007, 03:54 PM
  4. Find character when the length varies
    By Rookie_User in forum Excel General
    Replies: 3
    Last Post: 04-12-2006, 02:20 PM
  5. [SOLVED] number to time format when digit length varies
    By UM Win in forum Excel General
    Replies: 5
    Last Post: 12-08-2005, 10:00 PM
  6. [SOLVED] number to time format when digit length varies
    By UM Win in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-08-2005, 10:00 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