+ Reply to Thread
Results 1 to 8 of 8

How to sort two columns but one has formulas

Hybrid View

  1. #1
    Registered User
    Join Date
    07-24-2013
    Location
    new york
    MS-Off Ver
    Excel 2003
    Posts
    62

    How to sort two columns but one has formulas

    I have to columns: AgencyID and Number of devices sent.

    I need to sort by device but I am having trouble because the device column is a formula. How can I sort a column that has formulas. Remember that I am sorting 2 columns not just the device column. Thank you!

    MArvin

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: How to sort two columns but one has formulas

    I would copy and paste over the formula then sort.
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,082

    Re: How to sort two columns but one has formulas

    What is the formula in the cells?
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  4. #4
    Registered User
    Join Date
    07-24-2013
    Location
    new york
    MS-Off Ver
    Excel 2003
    Posts
    62

    Re: How to sort two columns but one has formulas

    Hi , I copied and paste it but I would like to know if there is way to sort formulas. Please see attached. It is a COUNTIFS formula
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: How to sort two columns but one has formulas

    Yeah, make a pivot table and it's all dynamic for you.

    iPad Inventory_test.xlsx

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: How to sort two columns but one has formulas

    Change the formula to:
    Formula: copy to clipboard
    =COUNTIFS('2014 Avon iPads by Agency'!$B$2:$B$65,B3,'2014 Avon iPads by Agency'!$C$2:$C$65,"Yes")


    Your lack of using absolute references makes your original list wrong with the counts because the range was being incremented with each row that the formula was copied to on the SOrt worksheet. With the range ABSOLUE, it remains the same when filled down.

    Your formula as entered on SOrt B3 starts out as:
    Formula: copy to clipboard
    =COUNTIFS('2014 Avon iPads by Agency'!B2:B65, SOrt!B3,'2014 Avon iPads by Agency'!C2:C65,"Yes")

    and ends up as this at the bottom of the column:
    Formula: copy to clipboard
    =COUNTIFS('2014 Avon iPads by Agency'!B41:B104, SOrt!B42,'2014 Avon iPads by Agency'!C41:C104,"Yes")


    As you can see, the range references have changed drastically from the top of the column to the bottom of the column.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  7. #7
    Registered User
    Join Date
    07-24-2013
    Location
    new york
    MS-Off Ver
    Excel 2003
    Posts
    62

    Re: How to sort two columns but one has formulas

    Thank you both- Newdoverman: I will fix this. Thank you.
    mikeTRON: this is what I needed. Thank you so much.

  8. #8
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: How to sort two columns but one has formulas

    Fix the formulae before creating the Pivot table because the values in your list as it stands are not correct.

+ 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. How do I sort columns with IF formulas in them?
    By Kristine in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-27-2006, 04:15 PM
  2. possible to Sort & add columns without messing up formulas
    By CLR in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 09-06-2005, 07:05 PM
  3. [SOLVED] Sort & add columns without messing up formulas
    By CLR in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 07:05 AM
  4. [SOLVED] Sort &amp;amp; add columns without messing up formulas
    By kate in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-08-2005, 12:05 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