Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 25
Default Multiple Lookup Criteria (revisited)

Hi All,

I'm using the following formula to return data in a sheet:

=SUMPRODUCT(--(Demand1!$A$1:$A$9731=$A21),(--Demand1!$B$1:$B$9731=G$19),(--Demand1!$D$1:$D$9731=$B$17),(Demand1!$C$1:$C$9731) )

In the sheet with the formula, I have part numbers down column A, dates
across rows (19 in this case), and another text qualifier in B17.

In sheet "Demand1" I have 4 columns - A has part numbers, B has dates, C has
quantity (the value I want returned), and D has the text qualifier.

My problem is that the formula sometimes works and sometimes doesn't - it is
very tempermental. I've tried matching all the formating, and still
sometimes it does not work.

Anyone have any ideas?

Thanks,
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Multiple Lookup Criteria (revisited)

There is a slight danger in your approach.

You are setting up criteria on cols A,B,D and pulling data from col C.

If more than one row matches the criteria, you will get the sum of the
passing col C values rather than just a single col C value.
--
Gary''s Student - gsnu200814


"Cam1234" wrote:

Hi All,

I'm using the following formula to return data in a sheet:

=SUMPRODUCT(--(Demand1!$A$1:$A$9731=$A21),(--Demand1!$B$1:$B$9731=G$19),(--Demand1!$D$1:$D$9731=$B$17),(Demand1!$C$1:$C$9731) )

In the sheet with the formula, I have part numbers down column A, dates
across rows (19 in this case), and another text qualifier in B17.

In sheet "Demand1" I have 4 columns - A has part numbers, B has dates, C has
quantity (the value I want returned), and D has the text qualifier.

My problem is that the formula sometimes works and sometimes doesn't - it is
very tempermental. I've tried matching all the formating, and still
sometimes it does not work.

Anyone have any ideas?

Thanks,

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 25
Default Multiple Lookup Criteria (revisited)

I kind of figured it out, but still need some help. The problem was that the
dates are both formatted mmm-yy (eg, Nov-08), but the dates on the first
sheet are all for the first of the month, and the dates on the second sheet
are dates all over the month.

Is there anyway to match it just by month and year and ignoring the day of
the month?

Thanks,

"Cam1234" wrote:

Hi All,

I'm using the following formula to return data in a sheet:

=SUMPRODUCT(--(Demand1!$A$1:$A$9731=$A21),(--Demand1!$B$1:$B$9731=G$19),(--Demand1!$D$1:$D$9731=$B$17),(Demand1!$C$1:$C$9731) )

In the sheet with the formula, I have part numbers down column A, dates
across rows (19 in this case), and another text qualifier in B17.

In sheet "Demand1" I have 4 columns - A has part numbers, B has dates, C has
quantity (the value I want returned), and D has the text qualifier.

My problem is that the formula sometimes works and sometimes doesn't - it is
very tempermental. I've tried matching all the formating, and still
sometimes it does not work.

Anyone have any ideas?

Thanks,

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Multiple Lookup Criteria (revisited)

Use the MONTH and YEAR functions, or use something like
TEXT(cell_ref,"yyyymm")
--
David Biddulph

"Cam1234" wrote in message
...
I kind of figured it out, but still need some help. The problem was that
the
dates are both formatted mmm-yy (eg, Nov-08), but the dates on the first
sheet are all for the first of the month, and the dates on the second
sheet
are dates all over the month.

Is there anyway to match it just by month and year and ignoring the day of
the month?

Thanks,

"Cam1234" wrote:

Hi All,

I'm using the following formula to return data in a sheet:

=SUMPRODUCT(--(Demand1!$A$1:$A$9731=$A21),(--Demand1!$B$1:$B$9731=G$19),(--Demand1!$D$1:$D$9731=$B$17),(Demand1!$C$1:$C$9731) )

In the sheet with the formula, I have part numbers down column A, dates
across rows (19 in this case), and another text qualifier in B17.

In sheet "Demand1" I have 4 columns - A has part numbers, B has dates, C
has
quantity (the value I want returned), and D has the text qualifier.

My problem is that the formula sometimes works and sometimes doesn't - it
is
very tempermental. I've tried matching all the formating, and still
sometimes it does not work.

Anyone have any ideas?

Thanks,



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 25
Default Multiple Lookup Criteria (revisited)

All three criteria have to be met for it to do this though, right?

"Gary''s Student" wrote:

There is a slight danger in your approach.

You are setting up criteria on cols A,B,D and pulling data from col C.

If more than one row matches the criteria, you will get the sum of the
passing col C values rather than just a single col C value.
--
Gary''s Student - gsnu200814


"Cam1234" wrote:

Hi All,

I'm using the following formula to return data in a sheet:

=SUMPRODUCT(--(Demand1!$A$1:$A$9731=$A21),(--Demand1!$B$1:$B$9731=G$19),(--Demand1!$D$1:$D$9731=$B$17),(Demand1!$C$1:$C$9731) )

In the sheet with the formula, I have part numbers down column A, dates
across rows (19 in this case), and another text qualifier in B17.

In sheet "Demand1" I have 4 columns - A has part numbers, B has dates, C has
quantity (the value I want returned), and D has the text qualifier.

My problem is that the formula sometimes works and sometimes doesn't - it is
very tempermental. I've tried matching all the formating, and still
sometimes it does not work.

Anyone have any ideas?

Thanks,

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
GetPivotData with variable criteria input? (revisited!) AndyCotgreave Excel Worksheet Functions 4 January 14th 10 07:37 PM
lookup multiple criteria Alonso[_2_] Excel Worksheet Functions 7 October 18th 08 12:22 AM
Lookup using multiple sheets and multiple criteria, sorry if 2 pos kjguillermo Excel Worksheet Functions 4 January 16th 07 03:21 AM
Lookup using multiple sheets and multiple criteria kjguillermo Excel Discussion (Misc queries) 2 January 14th 07 10:28 AM
Lookup with Multiple Criteria cbanks Excel Discussion (Misc queries) 1 January 26th 06 07:31 PM


All times are GMT +1. The time now is 07:32 PM.

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"