LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Sort by Cell Value?

Subscript out of range usually means one of the sheet names in your code
doesn't exist.

--
Regards,
Tom Ogilvy


"dan" wrote:

Thank you! That worked great! However, when I tried to run it on a
different spreadsheet it didnt work. I got an error saying 'Subscript
Out of Range'.

The only difference is if it says Retail in column H I want it to check
column L to see if something is in it or not. What could the problem
be? I am using the code below.

Thanks!!!!

For Each rCell4 In
Worksheets("Sheet1").UsedRange.Columns("H").Cells
If rCell4.Value = "Retail" Then
If rCell4.Offset(0, 4).Value = "" Then
rCell4.EntireRow.Copy Worksheets( _
"Retail NoProj").Cells(Rows.Count, 1).End( _
xlUp).Offset(1, 0)
Else
rCell4.EntireRow.Copy Worksheets( _
"Retail Proj").Cells(Rows.Count, 1).End( _
xlUp).Offset(1, 0)
End If
End If
Next rCell4


 
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
Want to link a cell of numbers with a cell of text & can sort Holly Excel Discussion (Misc queries) 1 March 25th 10 11:29 PM
Sort by cell format gregw Excel Discussion (Misc queries) 1 June 20th 08 10:47 PM
is it possible to sort the data by cell shading or cell color? L.T. Excel Discussion (Misc queries) 3 July 17th 06 08:24 PM
how to sort according to the cell color? sam Excel Discussion (Misc queries) 1 November 18th 05 05:01 AM
Excel Sort function should not sort the cell formatting! Lisa D.N.1 Excel Worksheet Functions 1 December 28th 04 08:37 PM


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