Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default help with finding a concatenated string

on one sheet, i want to concatenate 3 cells, say c2,d2,e2 (strToFind)and then
search for that string on another sheet in columns b,c and d concatenated.
what is the syntax for the find?

strToFind = ws.Range("C" & irow) & ws.Range("D" & irow) & ws.Range("E" & irow)

Set rngfound = ws2.Range("B2:D" & nextrow).Find(What:=strToFind, _
LookIn:=xlValues, lookat:=xlWhole)

--


Gary



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default help with finding a concatenated string

hi
Sub concat()
Dim n As String
Dim n1 As Range
Dim n2 As Range
Dim n3 As Range
Set n1 = Cells(2, 3) 'c2
Set n2 = Cells(2, 4) 'd2
Set n3 = Cells(2, 5) 'e2
n = n1 & n2 & n3
MsgBox n
'Cells(1, 1).Value = n
End Sub

regards
"Gary Keramidas" wrote:

on one sheet, i want to concatenate 3 cells, say c2,d2,e2 (strToFind)and then
search for that string on another sheet in columns b,c and d concatenated.
what is the syntax for the find?

strToFind = ws.Range("C" & irow) & ws.Range("D" & irow) & ws.Range("E" & irow)

Set rngfound = ws2.Range("B2:D" & nextrow).Find(What:=strToFind, _
LookIn:=xlValues, lookat:=xlWhole)

--


Gary




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default help with finding a concatenated string

i ended up just breaking the find down and not trying to find it all at once.

--


Gary


"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
on one sheet, i want to concatenate 3 cells, say c2,d2,e2 (strToFind)and then
search for that string on another sheet in columns b,c and d concatenated.
what is the syntax for the find?

strToFind = ws.Range("C" & irow) & ws.Range("D" & irow) & ws.Range("E" & irow)

Set rngfound = ws2.Range("B2:D" & nextrow).Find(What:=strToFind, _
LookIn:=xlValues, lookat:=xlWhole)

--


Gary





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default help with finding a concatenated string

wasn't looking to join the strings, already know that.

--


Gary


"FSt1" wrote in message
...
hi
Sub concat()
Dim n As String
Dim n1 As Range
Dim n2 As Range
Dim n3 As Range
Set n1 = Cells(2, 3) 'c2
Set n2 = Cells(2, 4) 'd2
Set n3 = Cells(2, 5) 'e2
n = n1 & n2 & n3
MsgBox n
'Cells(1, 1).Value = n
End Sub

regards
"Gary Keramidas" wrote:

on one sheet, i want to concatenate 3 cells, say c2,d2,e2 (strToFind)and then
search for that string on another sheet in columns b,c and d concatenated.
what is the syntax for the find?

strToFind = ws.Range("C" & irow) & ws.Range("D" & irow) & ws.Range("E" &
irow)

Set rngfound = ws2.Range("B2:D" & nextrow).Find(What:=strToFind,
_
LookIn:=xlValues, lookat:=xlWhole)

--


Gary






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
Change font formatting in a concatenated string Michael R Excel Discussion (Misc queries) 1 February 23rd 07 04:16 PM
Splitting a concatenated string into separate rows... Natarajan Excel Worksheet Functions 1 May 4th 06 05:57 PM
How do I break up a concatenated text string ? Bhobhojani Gudo Excel Discussion (Misc queries) 2 March 3rd 06 07:57 AM
Bold a portion of concatenated string joeeng Excel Discussion (Misc queries) 1 December 8th 05 08:26 PM
specify range name in formula with concatenated string Lori H Excel Worksheet Functions 2 July 19th 05 03:07 PM


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