In the attached sample , I have a huge database which cannot be sorted.
I have to find the price for 20 feet and 40 feet.
If one cell is blank the price for the next unique item (hereby product) should be considered.
if H column would refer to products (A,B,C) and Row 1 to 20/40 feet, then
H2: =SUMPRODUCT(($C$2:$D$8)*($B$2:$B$8=$H2)*($C$1:$D$1=I$1)), drag down and across, might be what you are after.