Comparing two rows disregarding any blanks

jcp3677

New Member
Joined
Jul 2, 2018
Messages
1
I am a complete rookie. I have searched Google extensively to no avail to a question that I feel like surely has a straightforward answer. I am attempting a pair wise comparison of location of fish during a 60 day period. The dates are the column headings and the fish ID's are the rows. I will be comparing the fish in row "2" to all of the other fish at first. I am using "
=IF(B$2=B3,1,0)" to get either a "1" if the location entered is the same or a "0" if it is not. I will the average the 1's and 0's to get a similarity score for the that pair of fish. Some of the dates (columns) have no location for the fish (row) in question. Right now the formula above enters a "0" because they are not the same. My question is this: What can I do to get Excel to disregard any spaces in either of the fish (rows) being compared?

Thanks you for any help you can provide.
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Try =IF(OR(B$2="",B3=""),"",IF(B$2=B3,1,0))
You will need to use the AVERAGEIF function to exclude the cells containing the "" ( which is invisible...)
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,239
Members
452,621
Latest member
Laura_PinksBTHFT

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