Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Using IF/And in a formula to find a value

I'm trying to learn formulas but not having much luck. Here's what I have.
I have a total of 7 columns and 9 rows of numbers like this shown below.

A B C J K L M
0 0 1 10 10 10 10
0 0 1 10 10 10 10
0 0 1 10 10 10 10
2 1 0 8 8 8 8
2 1 0 8 8 8 8
2 1 0 8 8 8 8
2 0 1 20 20 20 20
2 0 1 20 20 20 20
2 0 1 20 20 20 20

Here is what I want: Whenever column A=2, B=0, and C=1 then in a cell on
sheet 2 I would like the first value in column J when this is true to show
up (which would be the number 20).
Here was my formula:
IF(AND(Sheet1!$A$1:$A$9=2,Sheet1!$B$1:$B$9=0,Sheet 1!$C$1:$C$9=1),Sheet1!$J:$J9)

This formula gives an error which I can't figure out. Maybe I'm going at
this all wrong. Would appreciate any help

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Using IF/And in a formula to find a value


Enter with Ctrl+shift+enter (as an array formula)

=INDEX($J$1:$J$9,MATCH(1,($A$1:$A$9=2)*($B$1:$B$9= 0)*($C$1:$C$9=1),0))

You can change the constants (2,0 and 1) to be cells holding thes values

HTH

"lars1028" wrote:

I'm trying to learn formulas but not having much luck. Here's what I have.
I have a total of 7 columns and 9 rows of numbers like this shown below.

A B C J K L M
0 0 1 10 10 10 10
0 0 1 10 10 10 10
0 0 1 10 10 10 10
2 1 0 8 8 8 8
2 1 0 8 8 8 8
2 1 0 8 8 8 8
2 0 1 20 20 20 20
2 0 1 20 20 20 20
2 0 1 20 20 20 20

Here is what I want: Whenever column A=2, B=0, and C=1 then in a cell on
sheet 2 I would like the first value in column J when this is true to show
up (which would be the number 20).
Here was my formula:
IF(AND(Sheet1!$A$1:$A$9=2,Sheet1!$B$1:$B$9=0,Sheet 1!$C$1:$C$9=1),Sheet1!$J:$J9)

This formula gives an error which I can't figure out. Maybe I'm going at
this all wrong. Would appreciate any help

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,688
Default Using IF/And in a formula to find a value

Hi!

Try this:

Entered as an array using the key combination of CTRL,SHIFT,ENTER:

=INDEX(J1:J9,MATCH("201",A1:A9&B1:B9&C1:C9,0))

Biff

"lars1028" wrote in message
...
I'm trying to learn formulas but not having much luck. Here's what I
have.
I have a total of 7 columns and 9 rows of numbers like this shown below.

A B C J K L M
0 0 1 10 10 10 10
0 0 1 10 10 10 10
0 0 1 10 10 10 10
2 1 0 8 8 8 8
2 1 0 8 8 8 8
2 1 0 8 8 8 8
2 0 1 20 20 20 20
2 0 1 20 20 20 20
2 0 1 20 20 20 20

Here is what I want: Whenever column A=2, B=0, and C=1 then in a cell on
sheet 2 I would like the first value in column J when this is true to
show
up (which would be the number 20).
Here was my formula:
IF(AND(Sheet1!$A$1:$A$9=2,Sheet1!$B$1:$B$9=0,Sheet 1!$C$1:$C$9=1),Sheet1!$J:$J9)

This formula gives an error which I can't figure out. Maybe I'm going at
this all wrong. Would appreciate any help



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,688
Default Using IF/And in a formula to find a value

=INDEX($J$1:$J$9,MATCH(1,($A$1:$A$9=2)*($B$1:$B$9 =0)*($C$1:$C$9=1),0))

If a cell is empty:

($B$1:$B$9=0)

Will return TRUE, so:

2.....(Empty).....1

Will match.

Biff

"Toppers" wrote in message
...

Enter with Ctrl+shift+enter (as an array formula)

=INDEX($J$1:$J$9,MATCH(1,($A$1:$A$9=2)*($B$1:$B$9= 0)*($C$1:$C$9=1),0))

You can change the constants (2,0 and 1) to be cells holding thes values

HTH

"lars1028" wrote:

I'm trying to learn formulas but not having much luck. Here's what I
have.
I have a total of 7 columns and 9 rows of numbers like this shown below.

A B C J K L M
0 0 1 10 10 10 10
0 0 1 10 10 10 10
0 0 1 10 10 10 10
2 1 0 8 8 8 8
2 1 0 8 8 8 8
2 1 0 8 8 8 8
2 0 1 20 20 20 20
2 0 1 20 20 20 20
2 0 1 20 20 20 20

Here is what I want: Whenever column A=2, B=0, and C=1 then in a cell on
sheet 2 I would like the first value in column J when this is true to
show
up (which would be the number 20).
Here was my formula:
IF(AND(Sheet1!$A$1:$A$9=2,Sheet1!$B$1:$B$9=0,Sheet 1!$C$1:$C$9=1),Sheet1!$J:$J9)

This formula gives an error which I can't figure out. Maybe I'm going at
this all wrong. Would appreciate any help



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 Data in two seperate Spreadsheets Padraig Excel Worksheet Functions 6 June 28th 06 03:05 PM
find and paste formula Taru Excel Worksheet Functions 2 June 16th 06 08:50 PM
Find Formula Problem thigley986 Excel Worksheet Functions 4 February 27th 06 08:15 PM
copy and pasting a find all list into another column Ben Excel Discussion (Misc queries) 18 December 31st 05 10:51 PM
FIND formula that searches from right? KellyB Excel Worksheet Functions 1 January 21st 05 10:51 PM


All times are GMT +1. The time now is 05:18 AM.

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"