Return worksheet name if condition is met

Status
Not open for further replies.

Gipy

New Member
Joined
Sep 15, 2011
Messages
8
Hi All,

I have a formula that returns the name of the current worksheet if any of the other worksheets have a B8 cell that equals TEST, this can be seen below:

=IF(SUMPRODUCT(COUNTIF(INDIRECT("'"&MySheets&"'!"&CELL("address",B8)),"=TEST")),MID(CELL("filename"),FIND("]",CELL("filename"))+1,255),"NO")

This returns the name of the worksheet that holds this formula instead of the worksheet that has the B8 cell that has the text TEST in it.


I need the worksheet (or worksheets) name(s) returned for any of the worksheet(s) that meets this condition.

Any help would be much appreciated.

Thanks Gipy.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Sorry my excel skills are not much good and I have inherited some of the code I posted from someone else.
Yes, I think the MySheets is a named range but not sure how I would fix the code I posted to get the name of the worksheet returned when a certain cell matches the TEST text.
It does seem to work in part but if the TEST text condition is met in multiple sheets then I would need each sheet name returned.
Hope I've explained this OK.
 
Upvote 0
Please do not post the same question multiple times. All clarifications, follow-ups, and bumps should be posted back to the original thread. Per forum rules, posts of a duplicate nature will be locked or deleted (rule #9 here: http://www.mrexcel.com/forum/showthread.php?t=99490).

If you continue to exhibit this behaviour you will be suspended or banned.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,224,583
Messages
6,179,672
Members
452,937
Latest member
Bhg1984

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