Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 97
Default Return value in 3rd column based on 2 other columns

I have a worksheet with 3 columns. I would like to return the value of column
C to another worksheet based upon the values in Col A & B.
A B C
21057 1 63.50
21057 2 26.40
21057 3 44.80
21463 1 12.50
21463 2 38.50
21463 3 55.80

If A = 21463 and B = 1 then return 12.50. Maybe use vlookup? I know this is
probably easy, just can't think of the solution.

Thanks,
Joe M.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 266
Default Return value in 3rd column based on 2 other columns

Here's one solution - but it requires some intermediate fields

Make a column "D" that is =A1*100+B1
This will give you entries like 2105701, 2105702,2105703, 2146301, etc.
Column E should be =C1
Now you have a table in columns "D" and "E" and you can do a lookup of
2146301, for example, which will return the value you want. It isn't
elegant, but it gets the job done. I hope that helps.



"Joe M." wrote:

I have a worksheet with 3 columns. I would like to return the value of column
C to another worksheet based upon the values in Col A & B.
A B C
21057 1 63.50
21057 2 26.40
21057 3 44.80
21463 1 12.50
21463 2 38.50
21463 3 55.80

If A = 21463 and B = 1 then return 12.50. Maybe use vlookup? I know this is
probably easy, just can't think of the solution.

Thanks,
Joe M.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default Return value in 3rd column based on 2 other columns

=INDEX(C2:C100,MATCH(1,(A2:A100=21463)*(B2:B100=1) ,0))

entered with ctrl + shift & enter

Or since you have numbers in the 3rd column

=SUMPRODUCT(--(A2:A100=21463),--(B2:B100=1),C2:C100)

the latter will actually sum the 3rd column if there are more than one match
and it won't work if you need text values in a 3rd column


Also, instead of using 21463 and 1 etc you should use a cell for each where
you would type these
criteria that way you don't need to edit the formula when you change the
criteria


=INDEX(C2:C100,MATCH(1,(A2:A100=D1)*(B2:B100=D2),0 ))


for example




--


Regards,


Peo Sjoblom




"Joe M." wrote in message
...
I have a worksheet with 3 columns. I would like to return the value of
column
C to another worksheet based upon the values in Col A & B.
A B C
21057 1 63.50
21057 2 26.40
21057 3 44.80
21463 1 12.50
21463 2 38.50
21463 3 55.80

If A = 21463 and B = 1 then return 12.50. Maybe use vlookup? I know this
is
probably easy, just can't think of the solution.

Thanks,
Joe M.



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
Lookup based on 2 columns; return 1 value MsBeverlee Excel Worksheet Functions 4 December 16th 07 08:20 PM
Lookup 3 columns and return a result from another column [email protected] Excel Discussion (Misc queries) 4 February 21st 07 10:54 PM
Add up a column based on values in other columns Jay[_2_] Excel Worksheet Functions 5 February 17th 07 01:02 AM
looking up values in 1 column based on 2 other columns CMO Excel Worksheet Functions 5 August 8th 06 02:41 PM
Return Range of Numerical Values in Single Column based on Frequency Percentage Sam via OfficeKB.com Excel Worksheet Functions 9 October 28th 05 11:01 PM


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