Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,814
Default If ID # on one sheet isn't found on another...

I have two differnt source files for employees on two different tabs. Both
tabs have their ID #:
On sheet A it's in the B column.
B C
123 Sam

On sheet B it's on the G columm.

G H
(Sam's ID & name are not on Sheet B)

The row locations are different, meaning one week Sam's ID may be in A16, and
the next week in A20. Same with sheet B.

What formula could I use on sheet A to identify if an employee is on A but
not B, and on sheet B, if an employee is on B but not A ? Like if found on A
but not on B, produce the name (Sam) which is in the a column next to the
ID# ( column C in sheet A).

I hope this makes sense.

Much thanks,

Steve
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,696
Default If ID # on one sheet isn't found on another...

=IF(ISERROR(VLOOKUP(B2,SheetB!G:H,2,0)),C2,VLOOKUP (B2,SheetB!G:H,2,0))

Will look for the B2 value from Sheet A in Sheet B, column G. If it can't
find the exact value, it will return value from C2 of Sheet A. If it DOES
fidn the value, it returns the value from column H of sheet B.

=IF(ISERROR(VLOOKUP(G2,SheetA!A:B,2,0)),H2,VLOOKUP (G2,SheetA!A:B,2,0))

Same idea, but to be placed on Sheet B.

"Steve" wrote:

I have two differnt source files for employees on two different tabs. Both
tabs have their ID #:
On sheet A it's in the B column.
B C
123 Sam

On sheet B it's on the G columm.

G H
(Sam's ID & name are not on Sheet B)

The row locations are different, meaning one week Sam's ID may be in A16, and
the next week in A20. Same with sheet B.

What formula could I use on sheet A to identify if an employee is on A but
not B, and on sheet B, if an employee is on B but not A ? Like if found on A
but not on B, produce the name (Sam) which is in the a column next to the
ID# ( column C in sheet A).

I hope this makes sense.

Much thanks,

Steve

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 154
Default If ID # on one sheet isn't found on another...

Steve,

In D2 on Sheet A, I placed:
=IF(COUNTIF(B!G:G,A!B2)=0,C2,"")
which returns the persons name if they are not found on Sheet B, if it is
there, it returns nothing.

Same with Sheet B in I2, I placed:
=IF(COUNTIF(A!B:B,B!G2)=0,H2,"")

--
--Thomas [PBD]
Working hard to make working easy.
Answered your question? Click ''Yes'' below.


"Steve" wrote:

I have two differnt source files for employees on two different tabs. Both
tabs have their ID #:
On sheet A it's in the B column.
B C
123 Sam

On sheet B it's on the G columm.

G H
(Sam's ID & name are not on Sheet B)

The row locations are different, meaning one week Sam's ID may be in A16, and
the next week in A20. Same with sheet B.

What formula could I use on sheet A to identify if an employee is on A but
not B, and on sheet B, if an employee is on B but not A ? Like if found on A
but not on B, produce the name (Sam) which is in the a column next to the
ID# ( column C in sheet A).

I hope this makes sense.

Much thanks,

Steve

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default If ID # on one sheet isn't found on another...

Use this on SheetA:

=IF(ISNA(MATCH(B2,SheetB!G:G,0)),"not present on B","")

and copy down, then use this on SheetB:

=IF(ISNA(MATCH(G2,SheetA!B:B,0)),"not present on A","")

and copy this down.

In each sheet you know the names that are on that sheet, so you just
want to know which of them are not on the other sheet.

I've assumed that your data starts in row 2 on both sheets - adjust B2
and G2 if necessary.

Hope this helps.

Pete

On Oct 3, 9:50*pm, Steve wrote:
I have two differnt source files for employees on two different tabs. Both
tabs have their ID #:
On sheet A it's in the B column.
B * * * * * * C
123 * * * *Sam

On sheet B it's on the G columm.

G * * * * * * H
* * * * * * * * * *(Sam's ID & name are not on Sheet B)

The row locations are different, meaning one week Sam's ID may be in A16, and
the next week in A20. Same with sheet B.

What formula could I use on sheet A *to identify if an employee is on A but
not B, and on sheet B, if an employee is on B but not A ? Like if found on A
but not on B, produce the name (Sam) *which is in the a column next to the
ID# ( column C in sheet A).

I hope this makes sense.

Much thanks,

Steve


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,814
Default If ID # on one sheet isn't found on another...

Thanks guys.
I'm always amazed at how many different ways Excel can produce the desired
results. So far I tried the countif solution, because it initially seemed
like the least complicated, and it worked fine. I'll be trying the others to
try to broaden my Excelibility.

Thanks again to all

Steve

"Thomas [PBD]" wrote:

Steve,

In D2 on Sheet A, I placed:
=IF(COUNTIF(B!G:G,A!B2)=0,C2,"")
which returns the persons name if they are not found on Sheet B, if it is
there, it returns nothing.

Same with Sheet B in I2, I placed:
=IF(COUNTIF(A!B:B,B!G2)=0,H2,"")

--
--Thomas [PBD]
Working hard to make working easy.
Answered your question? Click ''Yes'' below.


"Steve" wrote:

I have two differnt source files for employees on two different tabs. Both
tabs have their ID #:
On sheet A it's in the B column.
B C
123 Sam

On sheet B it's on the G columm.

G H
(Sam's ID & name are not on Sheet B)

The row locations are different, meaning one week Sam's ID may be in A16, and
the next week in A20. Same with sheet B.

What formula could I use on sheet A to identify if an employee is on A but
not B, and on sheet B, if an employee is on B but not A ? Like if found on A
but not on B, produce the name (Sam) which is in the a column next to the
ID# ( column C in sheet A).

I hope this makes sense.

Much thanks,

Steve

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
"No RETURN() or HALT() function found on macro sheet." Will Excel Worksheet Functions 2 January 4th 07 10:10 PM
No RETURN() or HALT() function found on macro sheet [email protected] Excel Discussion (Misc queries) 3 September 26th 06 03:35 PM
how can I format sheet 1 if the value is found in sheet 2? Samad New Users to Excel 2 July 30th 06 12:05 AM
open new microsoft excel sheet and found my last same file all ti. farid fouad Excel Worksheet Functions 1 March 10th 06 01:41 AM
Copying whole rows to different sheet once found Gordy w/Hi Expectations Excel Discussion (Misc queries) 8 October 31st 05 01:00 PM


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