IF function over Multiple Worksheets

Basswell

New Member
Joined
Jun 4, 2004
Messages
30
Can the IF function be used over a range across multiple worksheets and multiple cells?

Here is the scenario:

I want to use an IF function to determine whether the word "Verify" is in a range of cells (B10:C20) across multiple worksheets ('Alpha:Delta'!).

If not possible, is there an alternative (strictly formula based)?

Thanks!
:help:
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
=OR(NOT(ISNA(MATCH("verify",'Alpha'!b10:c20))),NOT(ISNA(MATCH("verify",'Beta'!b10:c20))),NOT(ISNA(MATCH("verify",'Gamma'!B10:c20))),NOT(ISNA(MATCH("verify",'Delta'!b10:c20))))

Should do it.

However, that's pretty nasty, as you can see, and becomes unworkable if you have more than a handful of sheets....

If you are open to a quick VBA Function it can be much cleaner....
 
Upvote 0
Paddy

The morefunc addin will not embed to the workbook, I'm running Office Excel 2003 on XP Pro. I can only get countif.3d formula to work if I manually run morefunc.XLL, but it still will not embed into the workbook (so if I sent this off to someone else the function won't work for them).

And the alternative approach, Juan Pablo's formula, I cannot figure out how to apply it to multiple worksheets to use an "IF" function.

:banghead:

Please help if you can!
 
Upvote 0
Paddy

The morefunc addin will not embed to the workbook, I'm running Office Excel 2003 on XP Pro. I can only get countif.3d formula to work if I manually run morefunc.XLL, but it still will not embed into the workbook (so if I sent this off to someone else the function won't work for them)...

I just tried on Excel 2003: the add-in gets included successfully.

Alternatively...

Create a list of the relevant sheets in some range and name the range SheetList, then invoke:

=SUMPRODUCT(COUNTIF(INDIRECT("'"&SheetList&"'!B10:C20"),"Verify"))
 
Upvote 0
I tried reinstalling the add-in morefunc, and it failed to embed again.
This is what it says when I try manually installing (it didn't automatically install in the first place, so I followed instructions on morefunc.xls sheet):

"Morefunc n'apparait pas dans la liste des macros complementaires.
Veuillez l'ajouter par le menu Outils =>Macros complementaires => Parcourir"

Then when I try to use Tools|Add-In|Browse...morefunc.xll I get this message:

'C:Program Files\Morefunc\Morefunc.xll' is not a valid add-in.

Again, the only way I can get this to work is by opening morefunc.xll separately, but the problem remains - it won't embed into the workbook.


Next I tried the alternative approach you provided, but here is what happens:

Insert|Name|Define...
Sheetlist refers to =Sheet1:Sheet2!$B$10:$C$20

Cell D8 contains your formula and returns: #VALUE!
it looks like INDIRECT portion of formula is returning #value, array=volatile. :huh:

Sheet 1
Col B Col C
apple OK
orange OK
cherry ok
cucumber verify
pineapple ok
celery verify
melon OK
asparagus verify
potato verify
lemon OK
strawberry OK

Sheet 2
Col B Col C
radish verify
blueberry OK
kumquat OK
kiwi OK
guava ok
onion verify
garlic verify
sage verify
melon OK
lemon OK
strawberry OK

Could you clarify please? Thank you!!!
 
Upvote 0
"Create a list of the relevant sheets in some range..."

Don't use the insert | name | define route - just stick the sheet names in some cells.
 
Upvote 0
I tried reinstalling the add-in morefunc, and it failed to embed again.
This is what it says when I try manually installing (it didn't automatically install in the first place, so I followed instructions on morefunc.xls sheet):

"Morefunc n'apparait pas dans la liste des macros complementaires.
Veuillez l'ajouter par le menu Outils =>Macros complementaires => Parcourir"

Then when I try to use Tools|Add-In|Browse...morefunc.xll I get this message:

'C:Program Files\Morefunc\Morefunc.xll' is not a valid add-in.

Again, the only way I can get this to work is by opening morefunc.xll separately, but the problem remains - it won't embed into the workbook.


Next I tried the alternative approach you provided, but here is what happens:

Insert|Name|Define...
Sheetlist refers to =Sheet1:Sheet2!$B$10:$C$20

Cell D8 contains your formula and returns: #VALUE!
it looks like INDIRECT portion of formula is returning #value, array=volatile. :huh:

You need a clean install such that you see Morefunc appear under Tools.

Sheet 1
Col B Col C
apple OK
orange OK
cherry ok
cucumber verify
pineapple ok
celery verify
melon OK
asparagus verify
potato verify
lemon OK
strawberry OK

Sheet 2
Col B Col C
radish verify
blueberry OK
kumquat OK
kiwi OK
guava ok
onion verify
garlic verify
sage verify
melon OK
lemon OK
strawberry OK

Could you clarify please? Thank you!!!

Create a Summary sheet.

In A2:A3 enter:

Sheet1
Sheet2

Select A2:A3.
Go to the Name Box on the Formula Bar, type SheetList, and hit enter.

In C2 on Summary enter:

=SUMPRODUCT(COUNTIF(INDIRECT("'"&SheetList&"'!C10:C20"),"Verify"))

This assumes that "Verify" appears in C10:C20 on every sheet if at all.
 
Upvote 0
Still could not get the morefunc add-in installed. But that alternative method was......terrrrrrrrrrrrrIFIC!!!!

Thank you, Aladin!!!
8-) 8-) 8-)
 
Upvote 0
Hello,

The morefunc addin will not embed to the workbook.

Have you installed the latest Morefunc version (4.2) ? There are some changes related to this functionality.

Cordially,

Laurent
 
Upvote 0

Forum statistics

Threads
1,224,811
Messages
6,181,081
Members
453,021
Latest member
Justyna P

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