+ Reply to Thread
Results 1 to 2 of 2

Sort column when using countif & sumif functions

  1. #1
    Registered User
    Join Date
    04-20-2008
    Posts
    1

    Sort column when using countif & sumif functions

    Hi all,
    I'm having trouble using sorting data using countif and sumif functions.
    If i want to sort the column where i have a countif or sumif function, i can't keep the reference to the cell i need. For example, I need to count how many "A"s between A2:A5, so i have countif(A2:A5,A1), where A1 is “A". When i sort this column, if "A" gets sorted to another row, the formula will go to the new reference, but stays in the same cell, meaning A1 is now some new condition, say "B", but the forumula is on the same row as "B", but counting "A"s.

    I tried locking, A$2:A$5, A$1, this works, but i can't do the same for all when i have some hundred or even tens of rows worth of data ...

    This problem happens for Sumif as well.

    Is there any way to make sorting work using these -if functions?

    Thanks!

  2. #2
    Valued Forum Contributor
    Join Date
    02-09-2006
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    1,075
    I tried locking, A$2:A$5, A$1, this works, but i can't do the same for all when i have some hundred or even tens of rows worth of data ...
    A quick solution to updating your formulas is to drag the fill handle.
    Trish in Oz
    -------------
    A problem well defined is a puzzle half solved


    If you attach a sample of your workbook it will be easier to find a solution. Remember to remove/replace sensitive data before uploading the file. Look here if you need help with attachments:
    http://www.excelforum.com/faq.php?fa...b3_attachments

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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