Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
trem
 
Posts: n/a
Default Finding data in a different sheet


Hi there, i have 2 sheets, say named a and b, sheet a contains data
extracted of the internet. Is it possible for me to program sheet b to
search for any data which is already typed out in sheet b in column b
which is in sheet a and if it is not present to say it is so. The data
in sheets a is not organised in any particular column and that is what
is giving me problems so far.

This program also needs to be shared with others so i cannot do it
manually unfortunatly.

Thanks for any help.


--
trem
------------------------------------------------------------------------
trem's Profile: http://www.excelforum.com/member.php...o&userid=32222
View this thread: http://www.excelforum.com/showthread...hreadid=519707

  #2   Report Post  
Posted to microsoft.public.excel.misc
Toppers
 
Posts: n/a
Default Finding data in a different sheet

Try this:

Dim ws1 As Worksheet, ws2 As Worksheet
Dim rnga As Range, rngb As Range
Set ws1 = Worksheets("sheet1") ' <=== Sheet a
Set ws2 = Worksheets("sheet2") ' <=== sheet b
With ws1
Set rnga = .Range("a1:a" & .Cells(Rows.Count, "A").End(xlUp).Row)
End With
With ws2
Set rngb = .Range("b1:b" & .Cells(Rows.Count, "b").End(xlUp).Row)
For Each cell In rngb
If Application.CountIf(rnga, cell) = 0 Then
cell.Offset(0, 1) = "Not found" '<=== column C
End If
Next
End With


Or

use a formula (in column C of sheet b); place in C1 and copy down. Change
ranges/sheet names as required :

=IF(COUNTIF(Sheet1!$A$1:$A$100,Sheet2!B1)=0,"Not Present","Present")

HTH

"trem" wrote:


Hi there, i have 2 sheets, say named a and b, sheet a contains data
extracted of the internet. Is it possible for me to program sheet b to
search for any data which is already typed out in sheet b in column b
which is in sheet a and if it is not present to say it is so. The data
in sheets a is not organised in any particular column and that is what
is giving me problems so far.

This program also needs to be shared with others so i cannot do it
manually unfortunatly.

Thanks for any help.


--
trem
------------------------------------------------------------------------
trem's Profile: http://www.excelforum.com/member.php...o&userid=32222
View this thread: http://www.excelforum.com/showthread...hreadid=519707


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
Pull data from another sheet based on certain criteria steve_sr2 Excel Discussion (Misc queries) 1 February 23rd 06 10:08 AM
Combining data from cells from several excel sheets to a new sheet Rik Excel Discussion (Misc queries) 4 February 22nd 06 09:16 AM
Does excel recognise names rather than cells? Sue Excel Worksheet Functions 9 May 22nd 05 04:51 AM
Transfer data from sheet to sheet Jenn Excel Discussion (Misc queries) 4 January 20th 05 03:07 PM
Automatic cell increment with data from sheet 1 to sheet 2 Big G Excel Worksheet Functions 2 December 20th 04 05:59 PM


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