+ Reply to Thread
Results 1 to 4 of 4

Maintain IF statement when sort

  1. #1
    Registered User
    Join Date
    07-15-2014
    Location
    liverpool
    MS-Off Ver
    2003
    Posts
    24

    Maintain IF statement when sort

    Schedule.xlsx

    In the attached spreadsheet column E records:

    - "more than 2 years" IF the time elapsed since the date entered in column C is more than 2 years
    - "more than 1 year" IF the time elapsed since the date entered in column C is more than 1 year but less than 2 years
    - "within schedule" IF the time elapsed since the date entered in column C is less than 1 year

    I want to be able to sort the data in column E so that rows that equal more than 2 years sort to the top of the spreadsheet followed by rows that equal more than 1 year followed by rows that are within schedule, whilst maintaining what is achieved by the IF statements in column E.

    Thanks very much

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,002

    Re: Maintain IF statement when sort

    Hi there. I fixed two problems with this. I changed the starting phrase so that it returns a blank if Column C is empty. That stops the long line of responses in empty rows. I changed the references to A1 to $a$1. This locks the formulas to looking at A!. So when you drag the formula down, it keeps looking at A1.

    Once that was done (and some odd purple colouring in the background removed); they were sorted by Data?Sort/Column C/Values/Odest to Newst.

    How does this look?

    You might need to add a new CF rule to cover the bottom row, which currenytly has no shading...
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    07-15-2014
    Location
    liverpool
    MS-Off Ver
    2003
    Posts
    24

    Re: Maintain IF statement when sort

    Hi Glenn

    Thanks v. much for your speedy response - it sounds brilliant but I think you attached the original spreadsheet rther than your modified one. Please reattach and ill take a look

    Thanks once again

    Catherine

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,002

    Re: Maintain IF statement when sort

    Dohh! Is this it???
    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] maintain:Sort
    By tresmonos in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-19-2006, 01:35 PM
  2. [SOLVED] formulas won't maintain during sort -help please!
    By bj in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 07:05 AM
  3. [SOLVED] formulas won't maintain during sort -help please!
    By bj in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 06:05 AM
  4. formulas won't maintain during sort -help please!
    By MarcoPolo in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM
  5. How can I sort and maintain formatting?
    By littlelostgrl in forum Excel General
    Replies: 2
    Last Post: 08-24-2005, 03:11 PM

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