View Single Post
  #26   Report Post  
anilsolipuram
 
Posts: n/a
Default


try this now

Sub MACRO99()
Dim W As Worksheet
Dim range_input, e_range As Range
Dim VAL, sh_skip, temp As Variant
sh_skip = "Summary" 'sheetname to skip
VAL = InputBox("Enter which cell to search")
Set range_input = Range(VAL)
For Each e_range In range_input
temp = temp & "bold" & Range("b" & e_range.Row).Value & Chr(10)
For Each W In Worksheets
W.Select
If W.Name < sh_skip Then
If (IsNumeric(Range(e_range.Address).Value) And
Range(e_range.Address).Value < "") Then
temp = temp & W.Name & Chr(10)

End If
End If
Next
Next
MsgBox temp
Workbooks.Add
temp1 = Split(temp, Chr(10))
Range("a1").Select

Dim ch_bold As Variant

For i = 0 To UBound(temp1)
ch_bold = Split(temp1(i), "bold")
If (UBound(ch_bold) 0) Then

Selection.Value = ch_bold(1)

ActiveCell.Font.Bold = True
Else
Selection.Value = temp1(i)
End If
ActiveCell.Offset(1, 0).Select
Next
Application.DisplayAlerts = False

ActiveWorkbook.SaveAs Filename:="C:\sheetname.xls",
FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
ActiveWorkbook.Save
ActiveWorkbook.Close
Application.DisplayAlerts = True
Workbooks.OpenText Filename:="C:\sheetname.xls"
End Sub


--
anilsolipuram
------------------------------------------------------------------------
anilsolipuram's Profile: http://www.excelforum.com/member.php...o&userid=16271
View this thread: http://www.excelforum.com/showthread...hreadid=381213