sort data in 2 columns

jarhead58

Active Member
Joined
Sep 21, 2017
Messages
367
Office Version
  1. 2021
Platform
  1. Windows
Hello everyone!! My question is this, how can I sort largest to smallest column B with a formula that have references that I don't want changed and column A to follow the results of column B? I'll try to show example below. TIA

A B
1 =COUNTIF(G2:G2189,1)
2 =COUNTIF(G2:G2189,2)
etc. etc
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Did you try locking down your range references in your formulas, so they are absolute, i.e.
Code:
[COLOR=#333333]=COUNTIF([B]$[/B]G[B]$[/B]3:[B]$[/B]G[B]$[/B]2185,1)[/COLOR]

Alternatively, you could use Named Ranges. I really like using those for any formula with a fixed range, where you are going to be copying the formula down a bunch of rows. See: https://www.ablebits.com/office-addins-blog/2017/07/11/excel-name-named-range-define-use/
 
Last edited:
Upvote 0
Mikeross,

I copied the data to another column as value. Sorted the values that I copied largest to smallest. Not sure how the formulas can be aligned with the results in the original column.
 
Last edited:
Upvote 0
Joe4,

I will checkout that option after I return!! I let you know how that goes!!
 
Last edited:
Upvote 0
I copied the data to another column as value. Sorted the values that I copied largest to smallest. Not sure how the formulas can be aligned with the results in the original column.
I am finding it hard to envision what you are describing. If you are able to post a few before/after images, it may go a long way in showing us what you are trying to do.

There are tools you can use to post screen images. They are listed in Section B of this link here: http://www.mrexcel.com/forum/board-a...forum-use.html. Also, there is a Test Here forum on this board that you can use to test out these tools to make sure they are working correctly before using them in your question.
 
Upvote 0
This worked out perfect!! Thanks for yours and everyone else's help with this!!


Did you try locking down your range references in your formulas, so they are absolute, i.e.
Code:
[COLOR=#333333]=COUNTIF([B]$[/B]G[B]$[/B]3:[B]$[/B]G[B]$[/B]2185,1)[/COLOR]



Alternatively, you could use Named Ranges. I really like using those for any formula with a fixed range, where you are going to be copying the formula down a bunch of rows. See: https://www.ablebits.com/office-addins-blog/2017/07/11/excel-name-named-range-define-use/
 
Upvote 0

Forum statistics

Threads
1,224,819
Messages
6,181,153
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top