Help working IF(COUNTIF round a bug

Sam_Daniels

New Member
Joined
Nov 15, 2017
Messages
3
Hi all.

I have tried using formula =IF(COUNTIF(WorkingsOut!I4:I40,'Drop Down Data'!E3),'Drop Down Data'!H3,IF(COUNTIF(WorkingsOut!I4:I40,'Drop Down Data'!E4),'Drop Down Data'!H3,'Drop Down Data'!H2)) which links to a different workbook (Via a macro). However, I am led to believe there is a bug in excel that makes the link come up as #VALUE !

Is there a formula I can use instead of this to work around it?

Many thanks
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Hi,

you need to use the proper reference =IF(COUNTIF('[File Name.xslx]SheetName'!A1:A100 ...
 
Upvote 0
COUNTIF won't work if it references a closed workbook. In that scenario you can switch to SUMPRODUCT, something like

=IF(SUMPRODUCT((WorkingsOut!I4:I40='Drop Down Data'!E3)+0),'Drop Down Data'!H3,IF(SUMPRODUCT((WorkingsOut!I4:I40='Drop Down Data'!E4)+0),'Drop Down Data'!H3,'Drop Down Data'!H2))
 
Last edited:
Upvote 0
Just to actually answer the question,
Here's an alternate formula

=IF(OR(ISNUMBER(MATCH('Drop Down Data'!E3,WorkingsOut!I4:I40,0)),ISNUMBER(MATCH('Drop Down Data'!E4,WorkingsOut!I4:I40,0))),'Drop Down Data'!H3,'Drop Down Data'!H2)
 
Upvote 0

Forum statistics

Threads
1,223,902
Messages
6,175,278
Members
452,629
Latest member
SahilPolekar

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