LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Works on numbers but not on TEXT

Hi All.........
This formula seems to work on TEXT as well as numbers.
=IF(D10=D9,1,0)

But, when I try to use the code below, it will not work on TEXT...yet it
works fine on numbers.......can it be fixed to work on TEXT as well?

Sub WhichSort()
Dim RNG1
Dim lastcolumn As Long, c As Long
Dim lastrow As Long, r As Long
lastcolumn = Cells(Columns.Count).End(xlToLeft).Column
For c = lastcolumn To 1 Step -1
RNG1 = c
lastrow = Cells(Rows.Count, RNG1).End(xlUp).Row
For r = lastrow To 2 Step -1
If Cells(r, RNG1) = Cells(r, RNG1).Offset(-1, 0) Then
Cells(r, RNG1).Select
Else
GoTo 100
End If
Next r
ActiveCell.EntireColumn.Interior.ColorIndex = 4
100
Next c
MsgBox "Data sorted on the COLORED column, ASCENDING", vbOKOnly
Columns("A:M").Select
Selection.Interior.ColorIndex = xlNone
Range("F1").Select
End Sub

TIA
Vaya con Dios,
Chuck, CABGx3


 
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
Counting text problem - formula works initially Anne P Excel Worksheet Functions 3 July 8th 09 06:40 PM
filter works on letters not numbers Churley Excel Discussion (Misc queries) 2 May 29th 07 03:24 PM
Formula that works like text-to-column linglc Excel Worksheet Functions 6 March 9th 07 12:20 AM
External link only works for numbers -- for text values, #N/A is displayed unless linked file is open Sven Filter Links and Linking in Excel 1 February 22nd 05 08:10 AM
Userfrm Lookup Works For text not Number gregork Excel Programming 10 February 23rd 04 05:01 AM


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