Auto Flag from a list

matts

New Member
Joined
Sep 11, 2002
Messages
41
On the first sheet (1) I want to type a list of ID numbers into a sheet down the page. i.e.

12345
35678
67832
...

On a second sheet (2) I already have a mailing list, where there are thousands of people listed down the page i.e<pre>Column A Column B Column C
john Smith 12345 12 Long St
Stan Black 22345 1 Short way</pre>

I would like to run something on sheet (1) to locate all those ID numbers listed on this sheet and actually flag them in some way on sheet (2). ie in the case above the result may be<pre>Col A Column B Column C Column D
X john Smith 12345 12 Long St
Stan Black 22345 1 Short way</pre>Where a new column is inserted and an X shown beside those that match the list on Sheet(1).

I understand this is probably very difficult but I would appreciate any help. I fiddled with Loops but got totally confused in how to move between the two pages and increment the row I am searching from. Also, if the numbers on sheet (1) end then the loop should end.


Matt
This message was edited by Juan Pablo G. on 2003-02-13 22:43
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
On 2003-02-13 22:37, Ponsonby wrote:
=IF(ISNA(VLOOKUP(Sheet1!A$1:A$100,C1,1,0)),"","X")
I think that this formula is supposed to be:

=IF(ISNA(VLOOKUP(C1,Sheet1!A$1:A$100,1,0)),"","X")

another option is

=IF(COUNTIF(Sheet1!$A$1:$A$100,C1),"X","")

or

=IF(ISNUMBER(MATCH(C1,Sheet1!$A$1:$A$100,C1,0)),"X","")

or even just

=COUNTIF(Sheet1!$A$1:$A$100,C1)

with this custom formatting:

"X";;
 
Upvote 0
On 2003-02-13 22:37, Ponsonby wrote:
=IF(ISNA(VLOOKUP(Sheet1!A$1:A$100,C1,1,0)),"","X")

Or, equivalently:

=IF(ISNUMBER(MATCH(C1,Sheet1!$A$1:$A$100,0)),"","X")

If anyone has fastexcel etc handy, I'd be interested to see the relative performance for match & vlookup for large ranges...

paddy
 
Upvote 0
Thankyou Ponsonby,Juan Pablo, and Paddy. All the options work great, I appreciate your time and effort.

Thanks Juan Pablo for formatting my original post so it was a bit clearer to read.
 
Upvote 0
On 2003-02-13 23:01, PaddyD wrote:
End of the day, mind more focused on beer than truth conditions!

OK, now back to the truth conditions... What follows is a performance comparison of the formulas forwarded in the current thread.

The MainList consists of 20,000 (minus 1) unsorted numbers, while the CheckList counts 98 (Paddy did the workbook with data).

The following formulas, which check the existence of the Checklist numbers in the MainList, are compared:

In alphabetical order...

=IF(COUNTIF(MainList,B2),"On list","Not on list")

=IF(ISNUMBER(MATCH(B2,MainList,0)),"On list","Not on list")

=IF(ISNA(VLOOKUP(B2,MainList,1,0)),"Not on list","On list")

Here are the results of 5 runs for each formula, which are averaged...
all shoterversion.xls
ABCDEFGH
1WorkSheetProfiles
2CalcTime(Millisec)MicroSecs
3SheetnameUsedRangeSheetperFormula
4COUNTIF1,482.971,461.1414,909.55
5MATCH434.42425.784,344.68
6VLOOKUP451.18424.884,335.51
7
8
9WorkBookSummary
10SheetsCalcTime(Millisec)MicroSecsVolatilityBookBytes
11CountReCalcFullCalcperFormula%OvHeadperCell
12COUNTIF0.201,482.0715,123.170.0%20.9323.88
13MATCH0.21420.294,288.720.1%3.5123.47
14VLOOKUP0.23442.624,516.540.1%34.5724.00
15
FastXL
 
Upvote 0

Forum statistics

Threads
1,223,719
Messages
6,174,089
Members
452,542
Latest member
Bricklin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top