+ Reply to Thread
Results 1 to 7 of 7

Format Spreadsheet - split text columns, rearrange columns, conditional format

  1. #1
    Registered User
    Join Date
    09-11-2014
    Location
    San Francisco, CA
    MS-Off Ver
    2013
    Posts
    24

    Format Spreadsheet - split text columns, rearrange columns, conditional format

    Hello,

    I'm trying to write a macro that will perform the following for the attached example data:

    (1) Delete Column G - "Location"

    (2) Split Column F - "Penetration Time" into 2 columns. One for the "Date" (Column F) and one for the "Time" (new Column G). Ideally, the date should be formatted as DD-MMM-YY. The time should be formatted HH:MM AM/PM.

    (3) Column B - "Shape" should be moved to the farthest end of the data set (All other columns move to the left, this is the new Column G)

    (4) New Column D - "Change" should be moved to the farthest end of the data set (all other columns move to the left, this is new Column G)

    (5) If any times in the "Time" column (that is now Column E) are after 7:00am or before 10:00pm - that entire row should be deleted.

    (6) If any of the numbers in the "Change" column (that is now Column G) are higher than 8, the text of that number should change to red and be bolded.

    Thank you for your assistance! Ideas are greatly appreciated!
    Attached Files Attached Files
    Last edited by lacke81c; 04-13-2015 at 12:01 PM. Reason: Added expected outcome example

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,519

    Re: Format Spreadsheet - split text columns, rearrange columns, conditional format

    Not sure Im folling your request, Cant you show an a separate sheet your expected output
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Registered User
    Join Date
    09-11-2014
    Location
    San Francisco, CA
    MS-Off Ver
    2013
    Posts
    24

    Re: Format Spreadsheet - split text columns, rearrange columns, conditional format

    Hi Mike,

    I attached the expected outcome for the spreadsheet. I really appreciate your ideas.

    Thanks for your help!

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,519

    Re: Format Spreadsheet - split text columns, rearrange columns, conditional format

    Give this a try

    Please Login or Register  to view this content.
    Last edited by mike7952; 04-14-2015 at 03:12 AM.

  5. #5
    Registered User
    Join Date
    09-11-2014
    Location
    San Francisco, CA
    MS-Off Ver
    2013
    Posts
    24

    Re: Format Spreadsheet - split text columns, rearrange columns, conditional format

    Hi Mike,

    Is there a way to not have the 'new' data list in a different worksheet? (just write over the the stuff in the old worksheet?)

    I was playing around with the code and I tried to just take out the 'worksheets.add' line and add some kind of ELSE line in the the IF statement to delete the rows that don't qualify (ie times that are after 7am and before 10pm). But I haven't been able to get the correct language in there. Do you have any thoughts on this?

    Otherwise, it is working great! I had not even thought of this method, Thanks for that insight!

    Thank you!
    Last edited by lacke81c; 04-14-2015 at 03:29 PM.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,517

    Re: Format Spreadsheet - split text columns, rearrange columns, conditional format

    Try the attached. No loop.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    09-11-2014
    Location
    San Francisco, CA
    MS-Off Ver
    2013
    Posts
    24

    Re: Format Spreadsheet - split text columns, rearrange columns, conditional format

    These are both great methods. Always so many ways to skin the cat! Thank you both for your assistance. It is working perfectly now!

+ 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] Format Spreadsheet - borders, font size/style, split text to columns
    By lacke81c in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-30-2015, 02:34 PM
  2. Conditional Format applied sum to columns.
    By retrobones in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-16-2013, 04:17 AM
  3. Split String into many columns according to Format criteria
    By wali in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-23-2010, 01:50 AM
  4. Conditional format 3 columns some with 0's
    By LoriM1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-19-2007, 01:19 PM
  5. [SOLVED] Conditional Format ... Compare Columns?
    By Ken in forum Excel General
    Replies: 5
    Last Post: 03-25-2005, 06:07 AM

Tags for this Thread

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