+ Reply to Thread
Results 1 to 6 of 6

Move two cells up if condition met

  1. #1
    Registered User
    Join Date
    01-13-2005
    Posts
    23

    Move two cells up if condition met

    I have just one question. What would be the best code for below situation?
    If 5 first columns are empty and column, F & I have number DO: move numerical value of cell F & I one row up. It might be over 2000 rows of data.
    Thanks Krzys

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486
    Quote Originally Posted by Krzys
    I have just one question. What would be the best code for below situation?
    If 5 first columns are empty and column, F & I have number DO: move numerical value of cell F & I one row up. It might be over 2000 rows of data.
    Thanks Krzys
    Sorry, this just doesn't seem logical, why would you do this??
    I am not saying it can't be done but why would it be required??

  3. #3
    Registered User
    Join Date
    01-13-2005
    Posts
    23
    Hi Dave, Thanks for asking
    Of course, it makes sense to me. I convert text file into excel and when it is done some rows are not lining up. I have to convert text to excel with fixed width. It is accounting file. Sometimes when description of posting is long, DR. and balance are not in the some row where date and descriptions are. To illustrate:
    Example is as attachment
    I want 150.00 and 250.00 one row up. I know I will lose some letters of description like “ion” in this example. I hope it makes it easier to understand.
    Attached Images Attached Images
    Last edited by Krzys; 03-17-2007 at 08:34 PM.

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

    Shift Cells Up

    Hi Krzys,

    here is some code and an example workbook

    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-13-2005
    Posts
    23
    Dear Dave it is great what you wrote. I attached real live example. What I wnanted to achieve is move all yellow higlited cells one row up.
    Then I have code to delete empty rows. When I run your macro on excel 97 (at home) I have message variable not defined and highlited word Last Row (in line 3) also I tried to alter some cells but the same error.
    I don't want to be anoying but could you kindly look on my example.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    01-13-2005
    Posts
    23
    Dave I got it.
    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