#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default Display entire row

Hi, is there any way this macro display entire row?
This macro is searching in "C1:C1000" and display cells to the right.
Can this macro be made to display entire row when searched word is found?

Macro:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address < "$K$1" Then Exit Sub
Application.EnableEvents = False
Application.ScreenUpdating = False
With Sheets("Search")
lr = Application.Max(.Cells(Rows.Count, 1).End(xlUp).Row, 4)
..Range("a3:j" & lr).ClearContents
what = UCase(.Range("K1"))
On Error Resume Next
mydays = Array("ianuarie", "februarie", "martie", "aprilie", "mai", "iunie",
"iulie", "august", "septembrie", "octombrie", "noiembrie", "decembrie")
For Each sh In mydays

With Worksheets(sh).Range("C1:C1000")
Set c = .Find(what, LookIn:=xlValues, lookat:=xlPart)
If Not c Is Nothing Then
firstAddress = c.Address
Do

dlr = Sheets("Search").Cells(Rows.Count, "a").End(xlUp).Row + 1
c.Resize(, 8).Copy Sheets("Search").Cells(dlr, "a")
Sheets("search").Cells(dlr, "j") = Worksheets(sh).Name

Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address < firstAddress
End If
End With

Next sh
lr = .Cells(Rows.Count, 1).End(xlUp).Row
.Range("a3:j" & lr).Borders.LineStyle = xlNone
End With
Application.ScreenUpdating = True
Application.EnableEvents = True

End Sub

Can this be done?
Thanks!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
If Sheet1 column is marked complete, display entire row on Sheet2? CDZ Excel Worksheet Functions 1 October 12th 07 08:19 PM
Search lowest value in a column and display the entire row Bud New Users to Excel 4 August 28th 07 03:12 PM
Display entire 19 digit number michelle Excel Discussion (Misc queries) 2 November 16th 06 08:04 PM
How to display remaining txt file which overflowed MsgBox display? EagleOne Excel Discussion (Misc queries) 1 November 2nd 06 01:10 PM
Can I display an Excel chart as my screensaver display? Burke Charts and Charting in Excel 0 August 1st 06 07:01 PM


All times are GMT +1. The time now is 04:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"