Elegant way to find row in dataset with the largest number of non-empty columns?

TheDougmeister

New Member
Joined
Oct 12, 2021
Messages
25
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
I have a large dataset and am looking for a good "example" row.

Every row will have a "blank" (empty) value in at least one of the columns.

Is there an easy, elegant way to find out which row has the most columns with actual data?

I thought about exporting to a CSV and quickly scrolling down the file to "eyeball" which row is the "longest", but there must be a better way.

Thoughts?
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Thanks again, @Joe4 .

As I examine my data, I also see a lot of columns that have all zeros (either '0' or even '00/00/0000' in a "General" formatted cell, not "Date"). Should I start a new thread to ask how to also look for non-zero values or just ask here?
 
Upvote 0
You have a few options.

You could try to use a COUNTIFS formula, where you listed multiple criteria in telling it values NOT to select (see here: Excel formula: Count cells not equal to many things | Exceljet.)

You could also do a Find/Replace, replacing all the instance of values like 00/00/0000 with nothing.
If you do decide to go that route, I would HIGHLY recommend expanding the Options on the Replace tab, and make sure that you have the "Match entire cell contents" option checked.
That way, if you wanted to replace the 0's with nothing, it would only replace the values EXACLTY equal to 0, and not remove the 0 from numbers like "104", leaving "14".
 
Upvote 0

Forum statistics

Threads
1,224,598
Messages
6,179,818
Members
452,946
Latest member
JoseDavid

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