Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excell - Sorting

Status
Not open for further replies.

blazblaz

Technical User
Feb 3, 2002
71
0
0
CA
I have a sheet where using columns from A to M with some data.
I want to sort data based on column M descending, + column K descending from row 10-300. Column M have a values 1 or 0. After sorting from 300 rows only few will have value 1. I want to hide all rows which have value 0.
I want to do this in VB, so just clicking on some field to do automatically the above mentioned processing. Also after hiding rows with value 0 in column M, to set print area ready for printing.
The second function would be by clicking on another field programmed in VB to unhide all rows and to sort back the rows as original was.
Of course, I'd like to have protected sheet all the time i guess in VB it is possible to unprotect, sort, and protect
the sheet again.
Anyone VB programmer can help me?
 
blazblaz,

Turn on your macro recorder.

Go thru the process as stated above.

turn off the macro recorder.

Observe and clean up code.

Skip,
[sub]
[glasses] [red]Be advised:[/red] Researchers have found another Descartes trueism, "Cogito ergo spud."
"I think; therefore, I YAM!
[tongue][/sub]
 
Can anybody explain me how can you record with macro to hide every rows from (1-64000) whatever has less then 1 for value in column M, after sorting? Also to set the page for printing to get printed the page with all rows and columns where the value in column M=1?

Thanks
 
Use AutoFilter.

Skip,
[sub]
[glasses] [red]Be advised:[/red] Researchers have found another Descartes trueism, "Cogito ergo spud."
"I think; therefore, I YAM!
[tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top