Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default sorting code problems


Okay, here goes. The only reason I wanted to sort was so I could delet
the rows that have any other number besides 26 in column C. So, I foun
this code on the site and am currently trying to make it so that i
looks in Column C, and if there's anything besides the number 26 i
that column, it deletes the row. Then when its finished it hide
column C.

Dim rng as Range, sStr as String, i as Long
set rng = cells(1,"IV").End(xltoLeft)
for i = rng.column to 1 step -1
sStr = lcase(cells(1,i).Value)
if sStr < "first name" and _
sStr < "surname" and _
sStr < "score" then
cells(1,i).EntireColumn.Delete
end if
Nex

--
DK
-----------------------------------------------------------------------
DKY's Profile: http://www.excelforum.com/member.php...fo&userid=1451
View this thread: http://www.excelforum.com/showthread.php?threadid=26315

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 code problems DKY[_13_] Excel Programming 0 September 24th 04 04:28 PM
sorting code problems DKY[_12_] Excel Programming 0 September 24th 04 03:17 PM
sorting code problems DKY[_11_] Excel Programming 1 September 24th 04 03:06 PM
sorting code problems DKY[_10_] Excel Programming 2 September 24th 04 02:34 PM
Problems merging an excel file due to code or file problems? Cindy M -WordMVP- Excel Programming 0 September 14th 04 02:58 PM


All times are GMT +1. The time now is 06:41 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"