Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Compare strings of data

Sub AA()
Dim rng as Range, rng1 as Range
Dim cell as Range
Dim lNum as Long, res as Variant, res1 as Variant

With Worksheets("SPC")
set rng = .Range(.Cells(2,"G"),.Cells(rows.count,"G").End(xl up))
End With

With Worksheets("DIR")
set rng1 = .Range(.Cells(1,"E"),.Cells(rows.count,"E").End(xl up))
End With
rng1.font.Bold = False
for each cell in rng1
lNum = clng(left(cell.Value,10))
res = Application.Match(lNum,rng,0)
res1 = Application.Match(cStr(lNum),rng,0)
if iserror(res) and iserror(res1) then
cell.Font.bold = True
end if
Next
End Sub

--
Regards,
Tom Ogilvy


"Hal" wrote in message
...
Greetings once again,

I have a workbook which has one sheet that contains data from a

statistical
database. Another sheet is said workbook contains a DIR listing of the Raw
data files from which the data is sent to the database. (See the example
below.)

I would like to use the raw data file name in column E 'left(Ex,10)' from
the DIR sheet and determine if that string exists in the SPC sheet column

G.
If the string does not exist in column G, I want to BOLD the Ex cell in

the
DIR sheet.

I wish I knew a programmer that I could sit down with to build this code,
but I ask for your help to get me through this task.

Regards and thanks in advance

Hal in Detroit

(EXAMPLE)
F G H I
1 GREEN UNIT_NUMBER Date Time
2 Y 5262002058 9/26/2005 4:54:36 PM
3 Y 5262002047 9/26/2005 7:18:59 AM
4 N 5262002048 9/25/2005 5:41:21 PM
5 N 5262002048 9/25/2005 10:00:56 AM


B C D E
3 5:43 PM 23,117 526200205827001855.dat
4 8:13 AM 23,247 526200204726954287.dat
5 6:36 PM 56,632 526200204826885643.dat




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
Compare Strings dksaluki Excel Discussion (Misc queries) 4 October 18th 08 09:39 PM
Compare two strings andy62 Excel Worksheet Functions 8 September 6th 06 02:14 PM
Compare the strings yangyh Excel Discussion (Misc queries) 3 September 8th 05 04:45 AM
VBA search and compare strings stuart Excel Programming 1 June 11th 04 01:00 AM
How to compare only a PART of strings? Marty Excel Programming 2 June 9th 04 11:26 PM


All times are GMT +1. The time now is 12:26 AM.

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"