Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default matching and finding data

hi,

how do i match columnA in spreadsheetA with columnB in spreadsheetB to
find the value in columnD of spreadsheetB ?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default matching and finding data

this code put the results in column B of spreadsheetA

set shtA = sheets("spreadsheetA")
set shtB = sheets("spreadsheetB")
RowCount = 1
with ShtA
Do while .range("A" & Rowcount) < ""
Data = .range("A" & Rowcount)
Set c = ShtB.Columns("B").find(What:=Data, _
lookin:=xlvalues, lookat:=xlwhole)
if not c is nothing then
.Range("B" & RowCount) = c.offset(0,2)
end if

RowCount = RowCount + 1
loop

end with

"Lynn" wrote:

hi,

how do i match columnA in spreadsheetA with columnB in spreadsheetB to
find the value in columnD of spreadsheetB ?

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
Finding cells with matching data gary Excel Programming 9 May 22nd 08 05:53 AM
vlookup not finding matching data Beth Excel Worksheet Functions 1 June 6th 07 10:25 PM
Finding Matching Data on Another Sheet Jana[_3_] Excel Programming 1 May 18th 07 01:18 PM
Finding matching cell data SRL Excel Worksheet Functions 1 February 24th 06 02:48 PM
Importing and Finding Matching data Allan Busby Excel Programming 0 November 13th 03 06:38 PM


All times are GMT +1. The time now is 08:28 AM.

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"