ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   HLookup? or an array function?? (https://www.excelbanter.com/excel-worksheet-functions/25696-hlookup-array-function.html)

Murph

HLookup? or an array function??
 
First off thanks for always giving great assistance.

My problem deals with returning one result from 1 cell if 3 other cells
match the correct criteria.

Example: If Cell F1="2-Color" and Cell L1="4" and Cell N1="1" then place
Cell M1 value "2700" in Sheet2 Cell A1.

Maybe I'm thinking to hard by trying to make it an Hlookup or Array, now
that I look at it mabye some type of IF function will work???.



Don Guillett

Have a look in HELP index for AND
=if(and(1,2,3),1,2)

--
Don Guillett
SalesAid Software

"Murph" wrote in message
...
First off thanks for always giving great assistance.

My problem deals with returning one result from 1 cell if 3 other cells
match the correct criteria.

Example: If Cell F1="2-Color" and Cell L1="4" and Cell N1="1" then place
Cell M1 value "2700" in Sheet2 Cell A1.

Maybe I'm thinking to hard by trying to make it an Hlookup or Array, now
that I look at it mabye some type of IF function will work???.





Murph

I worded that example incorrectly, should have been:

Example: If Cell F1:F326="2-Color" and Cell L1:L326="4" and Cell N1:N326="1"
then sum Cell M1:M326 that match the above criteria and place that value in
Sheet2 Cell A1.

I tried this in the first cell on sheet 2 and got a "false":
=IF(AND(Counts!F3:F326="2-Color",AND(Counts!L3:L326="4",AND(Counts!N3:N326=" 1"))),SUM(Counts!M3:M326))

"Don Guillett" wrote:

Have a look in HELP index for AND
=if(and(1,2,3),1,2)

--
Don Guillett
SalesAid Software

"Murph" wrote in message
...
First off thanks for always giving great assistance.

My problem deals with returning one result from 1 cell if 3 other cells
match the correct criteria.

Example: If Cell F1="2-Color" and Cell L1="4" and Cell N1="1" then place
Cell M1 value "2700" in Sheet2 Cell A1.

Maybe I'm thinking to hard by trying to make it an Hlookup or Array, now
that I look at it mabye some type of IF function will work???.






Alok

The formula is as follows

=SUMPRODUCT(--(F3:F326="2-Color"),--(L3:L326="4"),--(N3:N326="1"),M3:M326)

Please note that this is an array formula and has to be entered with
Control-Shift-Enter.

Alok Joshi

"Murph" wrote:

I worded that example incorrectly, should have been:

Example: If Cell F1:F326="2-Color" and Cell L1:L326="4" and Cell N1:N326="1"
then sum Cell M1:M326 that match the above criteria and place that value in
Sheet2 Cell A1.

I tried this in the first cell on sheet 2 and got a "false":
=IF(AND(Counts!F3:F326="2-Color",AND(Counts!L3:L326="4",AND(Counts!N3:N326=" 1"))),SUM(Counts!M3:M326))

"Don Guillett" wrote:

Have a look in HELP index for AND
=if(and(1,2,3),1,2)

--
Don Guillett
SalesAid Software

"Murph" wrote in message
...
First off thanks for always giving great assistance.

My problem deals with returning one result from 1 cell if 3 other cells
match the correct criteria.

Example: If Cell F1="2-Color" and Cell L1="4" and Cell N1="1" then place
Cell M1 value "2700" in Sheet2 Cell A1.

Maybe I'm thinking to hard by trying to make it an Hlookup or Array, now
that I look at it mabye some type of IF function will work???.






JE McGimpsey

Well, it is an array-formula, but it doesn't need to be entered with
CTRL-SHIFT-ENTER.

In article ,
"Alok" wrote:

The formula is as follows

=SUMPRODUCT(--(F3:F326="2-Color"),--(L3:L326="4"),--(N3:N326="1"),M3:M326)

Please note that this is an array formula and has to be entered with
Control-Shift-Enter.


Alok

Thanks for clarifying that. I was under the impression that all array
formulas had to be entered with Ctrl-shift-enter.

Alok Joshi

"JE McGimpsey" wrote:

Well, it is an array-formula, but it doesn't need to be entered with
CTRL-SHIFT-ENTER.

In article ,
"Alok" wrote:

The formula is as follows

=SUMPRODUCT(--(F3:F326="2-Color"),--(L3:L326="4"),--(N3:N326="1"),M3:M326)

Please note that this is an array formula and has to be entered with
Control-Shift-Enter.




All times are GMT +1. The time now is 01:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com