Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 19
Default Finding Data in an Array

Hi,

I have four columns of data and these cells will all have unique entrys from
A1 to L20. However, this information may change round so that some times not
all the possible entries will be used. From this information then, I'd like
to create an IF statement that identifies whether (for example) A1 is present
in any of the four cells. If it is I'd like the cell to show T but if not I'd
like the cell to show A.

I'd be greatful if anyone could point me in the right direction as I'm sure
there's an answer somewhere!

Hannah
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Finding Data in an Array

=IF(OR(A1=Cell1,A1=Cell2,A1=Cell3,A1=Cell4),"T","A ")

Not sure about the 4 cell addresses but just change cell1 etc to B1 etc.

I assume show A meant literal "A"

HTH

"Hannah" wrote:

Hi,

I have four columns of data and these cells will all have unique entrys from
A1 to L20. However, this information may change round so that some times not
all the possible entries will be used. From this information then, I'd like
to create an IF statement that identifies whether (for example) A1 is present
in any of the four cells. If it is I'd like the cell to show T but if not I'd
like the cell to show A.

I'd be greatful if anyone could point me in the right direction as I'm sure
there's an answer somewhere!

Hannah

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 19
Default Finding Data in an Array

Thanx, Topper. The only problem is that the columns go from 1-1000. Any ideas?

"Toppers" wrote:

=IF(OR(A1=Cell1,A1=Cell2,A1=Cell3,A1=Cell4),"T","A ")

Not sure about the 4 cell addresses but just change cell1 etc to B1 etc.

I assume show A meant literal "A"

HTH

"Hannah" wrote:

Hi,

I have four columns of data and these cells will all have unique entrys from
A1 to L20. However, this information may change round so that some times not
all the possible entries will be used. From this information then, I'd like
to create an IF statement that identifies whether (for example) A1 is present
in any of the four cells. If it is I'd like the cell to show T but if not I'd
like the cell to show A.

I'd be greatful if anyone could point me in the right direction as I'm sure
there's an answer somewhere!

Hannah

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Finding Data in an Array

Is this what is required?

=IF(SUMPRODUCT(--($A$1:$A$10=E1))+SUMPRODUCT(--($B$1:$B$10=E1))+SUMPRODUCT(--($C$1:$C$10=E1))+SUMPRODUCT(--($D$1:$D$10=E1)),"T","A")

Or


=IF(SUMPRODUCT(--($A$1:$D$10=E1)),"T","A")

This will return "T" if E1 is found in any of columns A to D

"Hannah" wrote:

Hi,

I have four columns of data and these cells will all have unique entrys from
A1 to L20. However, this information may change round so that some times not
all the possible entries will be used. From this information then, I'd like
to create an IF statement that identifies whether (for example) A1 is present
in any of the four cells. If it is I'd like the cell to show T but if not I'd
like the cell to show A.

I'd be greatful if anyone could point me in the right direction as I'm sure
there's an answer somewhere!

Hannah

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Finding Data in an Array

...or just copy the formula down for the required rows.

Enter this in first cell and then copy down: B1 will become B2 etc.

=IF(OR(B1="A1",C1="A1",D1="A1",E1="A1"),"T","A")

OR

=IF(OR(B1=X1,C1=X1,D1=X1,E1=X1),"T","A")

where X1="A1" or any search value

Ignore posting on SUMPRODUCT!

"Hannah" wrote:

Thanx, Topper. The only problem is that the columns go from 1-1000. Any ideas?

"Toppers" wrote:

=IF(OR(A1=Cell1,A1=Cell2,A1=Cell3,A1=Cell4),"T","A ")

Not sure about the 4 cell addresses but just change cell1 etc to B1 etc.

I assume show A meant literal "A"

HTH

"Hannah" wrote:

Hi,

I have four columns of data and these cells will all have unique entrys from
A1 to L20. However, this information may change round so that some times not
all the possible entries will be used. From this information then, I'd like
to create an IF statement that identifies whether (for example) A1 is present
in any of the four cells. If it is I'd like the cell to show T but if not I'd
like the cell to show A.

I'd be greatful if anyone could point me in the right direction as I'm sure
there's an answer somewhere!

Hannah



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Finding Data in an Array

=IF(OR(B1=X1,C1=X1,D1=X1,E1=X1),"T","A")

where X1 contains value to be compared.

Put this in first cell(row) and copy down: B1 will become B2 etc.

Ignore SUMPRODUCT posting!

HTH

"Hannah" wrote:

Thanx, Topper. The only problem is that the columns go from 1-1000. Any ideas?

"Toppers" wrote:

=IF(OR(A1=Cell1,A1=Cell2,A1=Cell3,A1=Cell4),"T","A ")

Not sure about the 4 cell addresses but just change cell1 etc to B1 etc.

I assume show A meant literal "A"

HTH

"Hannah" wrote:

Hi,

I have four columns of data and these cells will all have unique entrys from
A1 to L20. However, this information may change round so that some times not
all the possible entries will be used. From this information then, I'd like
to create an IF statement that identifies whether (for example) A1 is present
in any of the four cells. If it is I'd like the cell to show T but if not I'd
like the cell to show A.

I'd be greatful if anyone could point me in the right direction as I'm sure
there's an answer somewhere!

Hannah

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
finding nearest match from an array Arjun Chowdhry Excel Discussion (Misc queries) 2 April 3rd 07 05:22 PM
Finding max array value of variable cell range The Fisherman Excel Discussion (Misc queries) 0 February 6th 07 02:54 PM
Finding Location of Maximum Value in 2D Array [email protected] Excel Discussion (Misc queries) 17 November 10th 06 02:36 PM
Finding Location of Maximum Value in 2D Array [email protected] New Users to Excel 15 November 9th 06 05:23 AM
Finding Location of Maximum Value in 2D Array [email protected] Excel Worksheet Functions 15 November 9th 06 05:23 AM


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