|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Using a VLOOKUP - when 2 rows match criteria it returns the first value in the cel only how 2 change
Hi I just joined up and couldnt see my problem replicated on the site and was just wanting a bit of formula advice,
I'm using a VLOOKUP and maybe should be using a different function or need help alterting to give the result I want when more than one instance of the lookup occurs with polar opisite results that need to be a single value. I've uploaded a copy of my spreadsheet with most of the data taken out (so you can see only the entries I'm having an issue with) I've got a speradsheet that I keep a list of purchase orders on, that I manually update the values for each order as they have payments or changes are made to them. on the attcahment its called COST DATA SHEET LOOKUP TABLE. Before I manually update my purchase order entries I download and paste a report onto the the Latest SQ01 Dumps page. This then activates the formulas to check the data against my manual entries (which I then review and update after I confirm the changes are correct). It conditional formats any cells that don't match to highlight as red for me. And the checks come back as TRUE or FALSE. Each line on the SQ01 Dumps page details a purchase order number and a item on each line from that order. Its the CELL Y3 on my cost data I would like help with. Its purpose is to lookup on the download dump page if an purchase order number is OPEN or CLOSED. in the cell is the code: Quote:
Now if you look at my download dump page you will see theres only 2 lines of data, which both apply to line 3 on cost data sheet. Now both lines apply to the same purchase order, one line is item 1 the other is item 2 on the same order. My problem is that one item is CLOSED the other is OPEN. Now my check using VLOOKUP on cell Y3 returns OPEN or CLOSED based on which item is on the higest row in the data. iF open comes first its open if closed comes first its closed. I would like my check in Y3 to review each line and if theres at least a single occrance of OPEN and 1 or more instantces of CLOSED. then I want this cell Y3 to display OPEN. Is there a way to weight the OPEN value above the closed one so it always shows when one of the rows has an open order? Maybe its more an IF solution possibily. If you could paste the code I need to change or download my excel docuement and change the forumula for me in Y3 on the cost data page and re-upload it with a response that would be brilliant. Thanks in advance for any help |
#2
|
|||
|
|||
Here's one way...
Code:
=if(COUNTIFS('Latest SQ01 Dumps'!A:A,'Cost Data Sheet Lookup Table'!A3,'Latest SQ01 Dumps'!O:O,"Open")>0,"Open","Closed") Code:
=if(COUNTIFS(Dumps!A:A,Lookups!A3,Dumps!O:O,"Open")>0,"Open","Closed") |
#3
|
|||
|
|||
Thanks I'll try it out when I get a chance
|
#4
|
|||
|
|||
thanks it works.
|
#5
|
||||
|
||||
FYI the ">0" part can be skipped
=if(COUNTIFS(Dumps!A:A,Lookups!A3,Dumps!O:O,"Open" ),"Open","Closed")
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
Tags |
countifs, vlookup |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Count unique values that match 2 or more criteria | caeiro01 | Excel | 1 | 10-25-2015 02:34 AM |
Vlookup and Match | ExcelVlookup | Excel | 4 | 06-22-2015 01:42 AM |
Vlookup returns inconsistent results | Jhnsnkth527 | Excel | 0 | 04-16-2015 12:36 PM |
vlookup or match | uhlersa | Excel | 2 | 12-04-2012 12:35 AM |
Vlookup or Index/Match - Multiple Criteria | ruci1225 | Excel | 1 | 01-15-2012 07:31 AM |