I have a table with column names as postal code and under every postal code there is revenue, but there are some postal s that have letters in them or are empty and that causes my formula to return error.
Idea is to calculate revenue for each region, where region name is manually entered and is calculated by the postal - example - postal codes between 2000 and 2299 are Sofia. Question is how to make the formula work even if there are letters in the postal s?
Thats the formula:
=SUMPRODUCT(
($B$3:$CW$3)
*(
IF(
ISBLANK($B$2:$CW$2);
0;
IFERROR(
REPLACE(
$B$2:$CW$2;
5;
2;
""
);
$B$2:$CW$2
)
)>=2000
*(
IF(
ISBLANK($B$2:$CW$2);
0;
IFERROR(
REPLACE(
$B$2:$CW$2;
5;
2;
""
);
$B$2:$CW$2
)<=2299
)
)
)
)
What it should do - based on the column with postal codes sum the revenue, but filtered for postal codes between 2000 and 2299.
What it does - calculates the revenue for all postal codes, doesnt take into account the >= 2000 and <= 2299.
Example table: https://wetransfer.com/downloads/18192739faa71754a449a0198cef949120220530083432/b964ef1f10d6b22d2bfcf2e30903811b20220530083447/6ef71f