+ Reply to Thread
Results 1 to 5 of 5

VB code to reorganize

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    VB code to reorganize

    Hello:

    Please refer to attached file.
    I have data as shown in column Q thru U.
    I need VB code to do following:
    Go thru data from Q2 down to last row (In this case Row#94).
    Copy Date Column Q data in Column A (Start A1).
    Copy Date Column S data in Column A (Start C1).
    Copy Date Column T data in Column A (Start E1).
    By pass if text "Check X????" is found in Column S.

    I have manually done data as shown in column A thru E

    Let me know if you have any questions.
    Thanks.

    R
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: VB code to reorganize

    Hi Riz,

    You can do this with a couple of formulae, if you are interested. Put this in P2:

    =IF(OR(Q2="",LEFT(S2,7)="Check X",T2=""),"",MAX(P$1:P1)+1)

    then copy down. Then put this formula in A1:

    =IFERROR(VLOOKUP(ROWS($1:1),$P:$T,COLUMNS($A:A)+1,0),"")

    Copy across into C1 and D1, format D1 as number with 2dp, then copy down.

    Hope this helps.

    Pete

  3. #3
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: VB code to reorganize

    Quote Originally Posted by rizmomin View Post
    ...Column Q...in Column A (Start A1).
    ...Column S...in Column A (Start C1).
    ...Column T...in Column A (Start E1).
    Do the 'B' and 'D' columns contain any data or are they empty ?

    Edit:

    If 'B' and 'D' are empty:
    Please Login or Register  to view this content.
    If 'B' and 'D' are not empty:
    Please Login or Register  to view this content.
    Last edited by mjr veverka; 04-29-2018 at 06:42 PM.

  4. #4
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB code to reorganize

    Hello pv:

    Thanks a lot, i will use your code, 'B & D' empty.

    Thanks to all

    Riz

  5. #5
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: VB code to reorganize

    If you have a really big range this might speed things up.
    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

+ 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] VB code to reorganize
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-29-2018, 02:29 PM
  2. [SOLVED] VB code to reorganize
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-15-2018, 09:02 AM
  3. [SOLVED] VB Code to reorganize data
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-01-2017, 04:31 PM
  4. [SOLVED] VB Code to reorganize data
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-03-2016, 08:57 PM
  5. VB Code to reorganize data..
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-19-2016, 11:09 PM
  6. [SOLVED] VB Code to reorganize ClockINOut
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-09-2016, 06:29 PM
  7. [SOLVED] VB Code to reorganize data
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 03-29-2016, 04:24 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