You mean IF(P2="-","-", ? The formula calculates the whole area with lots of empty cells (or rather cells with "-"). If I didn't have the first part it would return zero on those cells too. With the IF(P2="-","-", part it simply excludes those cells that contain "-".
By returning a "-" I want to mark that there is a formula in the cell but the result is not relevant.
If it returns "-" that means the result is not relevant. I could have make it return just an empty cell but the problem then is that you don't see that there is a formula in the cell.
If it returns 0 it means that there is no match and something is wrong. You either forgot to fill in a country or you spelled it different.
If it returns 1 or 2 it is ok. The 2 is because the port of Singapore is also called Singapore or something like that.
If the macro is not working it is probably because one of your named ranges is not defined. This is probably because there is a country missing or miss spelled somewhere. Check if the error check sheet returns any 0.
Bookmarks