+ Reply to Thread
Results 1 to 7 of 7

Two way sorting

  1. #1
    Registered User
    Join Date
    04-27-2016
    Location
    India
    MS-Off Ver
    10
    Posts
    4

    Two way sorting

    Hi! This is Shilpa.

    I have in column H2 onwards the Month-Year format
    (i.e different month and year in each cell).

    I wanted a code where in cell X1 when I give any Month-Year
    format then it calculates and gives me how many months it has been
    since the details in H2 .( i.e 10 or 20 or 33 months etc..) in the
    respective cell.

    And in cell Y1 if I give any range say 10-33 or single value may be 20 then from the record
    available from X2 onwards it checks and makes the respective
    cell red in column Y2 onwards. In case if in cell Y1 I do not need any
    range I will keep it blank.

    I am not sure a code or formula is suitable . But if possible will like to try both the options.

    Thanks

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Two way sorting

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window (or use the paperclip icon).
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    04-27-2016
    Location
    India
    MS-Off Ver
    10
    Posts
    4

    Re: Two way sorting

    Thanks a lot mehmetcik for the reply.
    Surely will keep this in mind.

    Attaching a file which might make the picture more clear.
    However if it is not clear then let me know.

    Thanks again
    have a nice day
    Shilpa
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Two way sorting

    1. Paste this formula in X2 and fill down
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    2. Highlight column Y, Select Conditional format, Select New Rule, Use Formula and enter this formula.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Select the format tab and select the fill colour red.

    3. Highlight column Y, Select Conditional format, Select New Rule, Use Formula and enter this formula.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Select the format tab and select the fill colour red.
    Attached Files Attached Files
    Last edited by mehmetcik; 04-29-2016 at 05:39 PM.

  5. #5
    Registered User
    Join Date
    04-27-2016
    Location
    India
    MS-Off Ver
    10
    Posts
    4

    Re: Two way sorting

    Hello mehmetcik
    Thanks for helping.
    The X column is working fine.
    The Y column I tried 3rd option where the colour gets red.
    But is not displaying the colour in the correct cells.
    When I gave 1-4 it selected the first four cells Y1:Y4 and made
    red. Then if I give 1-5 where the value 5 is not in the X column even then
    it selected cells Y1:Y5.
    Or may be I am doing any mistake just let me know.

    Thanks
    Shilpa

  6. #6
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Two way sorting

    Conditional format1
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Conditional Format2
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Formula for X2:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    04-27-2016
    Location
    India
    MS-Off Ver
    10
    Posts
    4

    Re: Two way sorting

    Hello mehmetcik
    Thanks a lot for solving my problem. The last three options are working fine.
    saved my half an hour everyday.

    Thanks again
    see you next time.

+ 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. Replies: 1
    Last Post: 12-16-2015, 01:04 PM
  2. [SOLVED] I require sorting formula in excel sheet with complex sorting.
    By kaminanirav in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-24-2015, 08:16 AM
  3. Replies: 0
    Last Post: 02-24-2014, 11:27 AM
  4. Sorting by Date--Need help when sorting by 2-digit year
    By Farris_TN in forum Excel General
    Replies: 3
    Last Post: 06-20-2013, 11:20 AM
  5. Sorting 2 data ranges by comparing one column in each and sorting to match
    By MDKsmiffy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-17-2013, 03:30 PM
  6. Sorting a range to invert it upside down without sorting by any specific column
    By luv2glyd in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-29-2013, 12:53 PM
  7. [SOLVED] Sorting a range to invert it upside down without sorting by any specific column
    By luv2glyd in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-28-2013, 12:43 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