A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

If column A = B then pick up value in D.



 
 
Thread Tools Display Modes
  #1  
Old April 28th, 2010, 01:15 PM posted to microsoft.public.excel.worksheet.functions
Peter Gasparik
external usenet poster
 
Posts: 3
Default If column A = B then pick up value in D.

Hi I have a problem.
I have two columns in different spreadsheets:
A B D
27238-2807 27736-1321 D1
27736-1321 27238-2807 D2
27736-1321 27736-1321 D3
27736-1321 27736-1321 D8
27251-3761 27238-2807 D1

I would like to write a formula or VBA the if A = B then pick up the value
in column D.
Could you please help?

Many thanks,

Peter.
  #2  
Old April 28th, 2010, 01:24 PM posted to microsoft.public.excel.worksheet.functions
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default If column A = B then pick up value in D.

Try the below in any cell in row1 and copy down as required...

=IF(A1=B1,D1,"")

--
Jacob (MVP - Excel)


"Peter Gasparik" wrote:

Hi I have a problem.
I have two columns in different spreadsheets:
A B D
27238-2807 27736-1321 D1
27736-1321 27238-2807 D2
27736-1321 27736-1321 D3
27736-1321 27736-1321 D8
27251-3761 27238-2807 D1

I would like to write a formula or VBA the if A = B then pick up the value
in column D.
Could you please help?

Many thanks,

Peter.

  #3  
Old April 28th, 2010, 01:29 PM posted to microsoft.public.excel.worksheet.functions
Mike H
external usenet poster
 
Posts: 8,419
Default If column A = B then pick up value in D.

Hi,

Try this and drag down

=IF(Sheet1!A1=Sheet1!B1,Sheet1!D1,"")
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Peter Gasparik" wrote:

Hi I have a problem.
I have two columns in different spreadsheets:
A B D
27238-2807 27736-1321 D1
27736-1321 27238-2807 D2
27736-1321 27736-1321 D3
27736-1321 27736-1321 D8
27251-3761 27238-2807 D1

I would like to write a formula or VBA the if A = B then pick up the value
in column D.
Could you please help?

Many thanks,

Peter.

  #4  
Old April 28th, 2010, 01:56 PM posted to microsoft.public.excel.worksheet.functions
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default If column A = B then pick up value in D.

Oops...Didnt notice "different spreadsheets"..Could you please clarify?

--Do you mean ColA and ColB in different "spreadsheets" or both Cols in one
different spreadsheet?

--If both columns are in the same spreadsheet; then try what Mike has posted..

--Do you mean a row to row match or check whether each cell in Col A of
SheetX exist in Col B of SheetY...and if so return the corresponding value of
Cell A1 from SheetX Col D

--
Jacob (MVP - Excel)


"Jacob Skaria" wrote:

Try the below in any cell in row1 and copy down as required...

=IF(A1=B1,D1,"")

--
Jacob (MVP - Excel)


"Peter Gasparik" wrote:

Hi I have a problem.
I have two columns in different spreadsheets:
A B D
27238-2807 27736-1321 D1
27736-1321 27238-2807 D2
27736-1321 27736-1321 D3
27736-1321 27736-1321 D8
27251-3761 27238-2807 D1

I would like to write a formula or VBA the if A = B then pick up the value
in column D.
Could you please help?

Many thanks,

Peter.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:05 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.