Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Help my please: VBA code for "Find" function

I have two columns in diferent Sheets.

A
1 Acidophilus with Psylium (100 capsule)
2 AC-Zymes (100 capsule)
3 Beta Carotene (100 capsule gelatinoase)
4 Chelated Zinc (100 tablete)
5 Full Spectrum (90 tablete)
Sheet1

A
1 Chelated Zinc (100 tablete)
2 €¦€¦€¦€¦€¦€¦€¦€¦€¦€¦€¦.
3 Acidophilus with Psylium (100 capsule)
4 €¦€¦€¦€¦€¦€¦€¦€¦€¦€¦€¦€¦€¦€¦
5
Sheet2


I want to find and select in Sheet2 the content from one or other
Sheet1 cells, using a VBA code. eg: Fiind in Sheet2.Column(A:A) the content
of Sheet1.Range(A4)
Thanks in advance

Emil

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Help my please: VBA code for "Find" function


with sheets("Sheet1")
LastRow = .Range("A" & Rows.Count).end(xlup).Row
ForRowCount = 1 to LastRow
Itm = .Range("A" & RowCount)
with Sheets("Sheet2")
set c = .Columns("A").Find(what:=Itm, _
lookin:=xlvalues, lookat:=xlwhole)
if c is nothing then
msgbox("Could not find : " & itm)
else
'c is the cell with the matched item
end With

Next RowCount
end with


"emil" wrote:

I have two columns in diferent Sheets.

A
1 Acidophilus with Psylium (100 capsule)
2 AC-Zymes (100 capsule)
3 Beta Carotene (100 capsule gelatinoase)
4 Chelated Zinc (100 tablete)
5 Full Spectrum (90 tablete)
Sheet1

A
1 Chelated Zinc (100 tablete)
2 €¦€¦€¦€¦€¦€¦€¦€¦€¦€¦€¦.
3 Acidophilus with Psylium (100 capsule)
4 €¦€¦€¦€¦€¦€¦€¦€¦€¦€¦€¦€¦€¦€¦
5
Sheet2


I want to find and select in Sheet2 the content from one or other
Sheet1 cells, using a VBA code. eg: Fiind in Sheet2.Column(A:A) the content
of Sheet1.Range(A4)
Thanks in advance

Emil

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Help my please: VBA code for "Find" function

Thank you very, very, very much
Emil
"joel" wrote:


with sheets("Sheet1")
LastRow = .Range("A" & Rows.Count).end(xlup).Row
ForRowCount = 1 to LastRow
Itm = .Range("A" & RowCount)
with Sheets("Sheet2")
set c = .Columns("A").Find(what:=Itm, _
lookin:=xlvalues, lookat:=xlwhole)
if c is nothing then
msgbox("Could not find : " & itm)
else
'c is the cell with the matched item
end With

Next RowCount
end with


"emil" wrote:

I have two columns in diferent Sheets.

A
1 Acidophilus with Psylium (100 capsule)
2 AC-Zymes (100 capsule)
3 Beta Carotene (100 capsule gelatinoase)
4 Chelated Zinc (100 tablete)
5 Full Spectrum (90 tablete)
Sheet1

A
1 Chelated Zinc (100 tablete)
2 €¦€¦€¦€¦€¦€¦€¦€¦€¦€¦€¦.
3 Acidophilus with Psylium (100 capsule)
4 €¦€¦€¦€¦€¦€¦€¦€¦€¦€¦€¦€¦€¦€¦
5
Sheet2


I want to find and select in Sheet2 the content from one or other
Sheet1 cells, using a VBA code. eg: Fiind in Sheet2.Column(A:A) the content
of Sheet1.Range(A4)
Thanks in advance

Emil

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
"Find" function question - No code required N1KO Excel Discussion (Misc queries) 1 May 6th 09 03:59 PM
"Soft Code" Find File Directory Or Alternative Neon520 Excel Programming 2 December 22nd 08 06:25 PM
Whats wrong with this? MyWBAccRep.Sheets("Volumes").Cells.Find("latest").Copy.Offset(0, Simon[_2_] Excel Programming 2 August 11th 08 01:29 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM


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