Multiple sheet text.

SunDesignJoe

New Member
Joined
Aug 2, 2010
Messages
2
I am using the following formula to check three different sheets for text in a particular cell. I would like an easier way to do this so that I can add additional sheets and continue to search all of them for text without continuing a really long formula.

=IF(Sheet2!A1<>"",Sheet2!A1,IF(Sheet1!A1<>"",Sheet1!A1,IF(Sheet4!A1<>"",Sheet4!A1,"")))
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
I see several people have viewed this but noone seems to have an answer so I am posting this to recirculate my request. Any help would be greatly appreciated.:)
 
Upvote 0
Not without VBA you can't. I recommend something on the lines of:

Code:
Option Base 1
Sub RotateWs()
Dim wb As Workbook
Dim ws As Worksheet
ReDim Mytest(1)
Set wb = ThisWorkbook
c = 0
For Each ws In wb.Worksheets
    c = c + 1
    ReDim Preserve Mytest(c)
    Mytest(c) = ws.Range("A1").Value
    If c > 1 Then
        If Mytest(c) <> Mytest(c - 1) Then
            MsgBox "At least two values differ"
            GoTo EndSub
        End If
    End If
Next ws
MsgBox "All values are identical"
Exit Sub
EndSub:
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,805
Messages
6,121,665
Members
449,045
Latest member
Marcus05

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