+ Reply to Thread
Results 1 to 3 of 3

shifting data into another column when condition met in a loop

  1. #1
    Forum Contributor
    Join Date
    04-16-2016
    Location
    bognor
    MS-Off Ver
    Pro-Plus 2016
    Posts
    153

    shifting data into another column when condition met in a loop

    Hi all,

    I wonder if anyone can help me with this problem.I have a list of numbers in COLUMN C,and COLUMN D.I want to be able to loop through column C and when I hit a certain number(lets say 5) copy the corresponding number in COLUMN D into the corresponding cell in COLUMN E.Also I want the loop to stop when the data stops so it doesn't wander down to the bottom of the page and take ages
    I have given a little illustration below of what I require.See how when I hit the number 5 in Col C the corresponding number in Col D is copied into the corresponding cell in Col E.Any help much appreciated.

    C D E F G
    1 9
    5 4 4
    7 4
    5 3 4
    2 7
    2 2
    2 11

    Kind Regards Barro

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

    Re: shifting data into another column when condition met in a loop

    Check this out,

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    04-16-2016
    Location
    bognor
    MS-Off Ver
    Pro-Plus 2016
    Posts
    153

    Re: shifting data into another column when condition met in a loop

    Hi Dave,

    Thanks for that great reply,the code works perfectly and was just what I wanted.Many many thanks.
    Kind Regards
    Barrowinfurnace

+ 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] shifting data to new column
    By kochark in forum Excel General
    Replies: 7
    Last Post: 11-27-2014, 03:36 PM
  2. Working Validation No Longer Works After Shifting to another Column for the Source of Data
    By young_padawan_in_exl in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-16-2013, 08:16 AM
  3. loop for shifting one column after each calculation
    By burnmeister in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-02-2013, 03:53 PM
  4. Replies: 0
    Last Post: 08-14-2012, 09:42 AM
  5. Shifting rows of data so that they all line up in the same column
    By Ricker090 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-28-2012, 04:56 PM
  6. Replies: 0
    Last Post: 10-25-2011, 04:06 AM
  7. [SOLVED] Loop column A and delete and move on condition
    By Rob in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-15-2005, 12:06 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