Sort and organize date based on the adjoining column containing data

mikecox39

Active Member
Joined
Mar 5, 2014
Messages
251
Office Version
  1. 365
Platform
  1. Windows
I want to sort values that are in Column C. But I want those values chosen based on whether Column D contains data.


If I were to say what I want in English I'd put it this way:


Select all the values in Column C where Column D contains data, then count them and create a list showing how many are in each of the following groups.


  1. < 101
  2. 101 and 110
  3. 111 and 120
  4. 121 and 130
  5. >130
 
Last edited:

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Maybe

1. < 101
=COUNTIFS(D:D,"<>",C:C,"<101")

2. 101 and 110
=COUNTIFS(D:D,"<>",C:C,">=101",C:C,"<=110")

Same idea for 3, 4 and 5

M.
 
Upvote 0
Thanks for pointing showing me that function. I'm still learning VBA and haven't gotten to Functions yet.
 
Upvote 0
Is it possible to put these formulas into cells so they auto calculate and get displayed in a MsgBox?
 
Upvote 0
You should put the formulas in different cells, but a formula cannot generate a MsgBox.

M.
 
Upvote 0
You should put the formulas in different cells, but a formula cannot generate a MsgBox.

M.
Ok, I just figured it out o_O I simply put it in a cell and the result appeared! Thanks again for your help with the f\u questions.
 
Upvote 0

Forum statistics

Threads
1,213,497
Messages
6,113,999
Members
448,543
Latest member
MartinLarkin

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