#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Sort Cells?

I've got an Excel worksheet where the first column contains a keyword. I want to have a
button, or an option, or whatever, that I can click so that if the first column equals a
certain word, then do not display the row containing that column.

How can I do this, please???

Thanks!

Vic



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Sort Cells?

Sub Hiderows()
Dim cell as Range
for each cell in Activesheet.UsedRange.columns(1).Cells
if instr(1,cell,"TestWord",vbTextcompare) then
cell.EntireRow.Hidden = True
else
cell.EntireRow.Hidden = False
end if
Next
End Sub

--
regards,
Tom Ogilvy


"Victor" wrote:

I've got an Excel worksheet where the first column contains a keyword. I want to have a
button, or an option, or whatever, that I can click so that if the first column equals a
certain word, then do not display the row containing that column.

How can I do this, please???

Thanks!

Vic




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Sort Cells?

Thank you, Tom!

Vic



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
Sorting formula cells not same as sort of value cells? Yikes! Barn E. Fife Excel Discussion (Misc queries) 4 October 13th 11 08:35 PM
Auto-Sort Won't Sort All Column Cells TikiTembo Excel Discussion (Misc queries) 1 March 25th 08 07:00 PM
Sort all cells except one? HoganD87 Excel Discussion (Misc queries) 1 March 11th 08 04:01 PM
Sort a list with cells referring to others cells Friis(DK) Excel Discussion (Misc queries) 6 February 24th 07 03:56 AM
sort spreadsheet, "merged cells" comes up. Find cells? Unmerge ? lowell Excel Discussion (Misc queries) 1 August 20th 06 09:10 AM


All times are GMT +1. The time now is 03:02 PM.

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

About Us

"It's about Microsoft Excel"