Let us say our first sheet's name is 'A'. How can we write data's sheet names in same column(B1) to sheet A. And again we search for SheetA's C1,D1 so on..
i found this code here this is useful but does not respond my need
Let us say our first sheet's name is 'A'. How can we write data's sheet names in same column(B1) to sheet A. And again we search for SheetA's C1,D1 so on..
i found this code here this is useful but does not respond my need
Lets say we are searching for "happiness" on each sheet except the first sheet. Give this a try:
Sub FindingHappiness()
Dim N As Long, M As Long
Dim s As String, r As Range
s = "happiness"
N = 10
For M = 2 To Sheets.Count
Sheets(M).Activate
For Each r In ActiveSheet.UsedRange
If InStr(r.Value, s) > 1 Then
Sheets(1).Cells(N, 2).Value = ActiveSheet.Name
N = N + 1
Exit For
End If
Next
Next
End Sub