Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 129
Default Search returning ans in terms of Rows & Columns

Hi,

Can excel search which cells my answers belong to?

example:
A B C D E F
4 2 3 6 7 9

Lets say my ans is "3"

it will show "number 3 belong to (C,1)"
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Search returning ans in terms of Rows & Columns

If your answer is in A2, then
=ADDRESS(1,MATCH($A$2,A1:F1,0),4,1)

gives C1.

Regards,
Stefi

Will ezt *rta:

Hi,

Can excel search which cells my answers belong to?

example:
A B C D E F
4 2 3 6 7 9

Lets say my ans is "3"

it will show "number 3 belong to (C,1)"

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Search returning ans in terms of Rows & Columns

In C,1 format

=SUBSTITUTE(ADDRESS(1,MATCH($A$2,A1:F1,0),2,1),"$" ,",")

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Stefi" wrote in message
...
If your answer is in A2, then
=ADDRESS(1,MATCH($A$2,A1:F1,0),4,1)

gives C1.

Regards,
Stefi

"Will" ezt rta:

Hi,

Can excel search which cells my answers belong to?

example:
A B C D E F
4 2 3 6 7 9

Lets say my ans is "3"

it will show "number 3 belong to (C,1)"



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 129
Default Search returning ans in terms of Rows & Columns

stefi,

wat if i have a few rolls of number?

A B C D E F
1 5 6 7 8 9 10
2 11 12 13 19 20 21

i wan my ans to show; number 8 belong to D,1

I try to use ur formula but I cant get the result

"Stefi" wrote:

If your answer is in A2, then
=ADDRESS(1,MATCH($A$2,A1:F1,0),4,1)

gives C1.

Regards,
Stefi

Will ezt *rta:

Hi,

Can excel search which cells my answers belong to?

example:
A B C D E F
4 2 3 6 7 9

Lets say my ans is "3"

it will show "number 3 belong to (C,1)"

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Search returning ans in terms of Rows & Columns

That's another case!
I could solve it only with a UDF:

Public Function FindInRng(findrng As Range, ansrng As Range) As String
FindInRng = findrng.Find(What:=ansrng.Value, After:=findrng(1),
LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False, SearchFormat:=False).Address(False, False)
End Function

Usage (answer being in G1):

=findinrng(A1:F2,$G$1)


Adjust A1:F2 range to your needs!

Regards,
Stefi

Will ezt *rta:

stefi,

wat if i have a few rolls of number?

A B C D E F
1 5 6 7 8 9 10
2 11 12 13 19 20 21

i wan my ans to show; number 8 belong to D,1

I try to use ur formula but I cant get the result

"Stefi" wrote:

If your answer is in A2, then
=ADDRESS(1,MATCH($A$2,A1:F1,0),4,1)

gives C1.

Regards,
Stefi

Will ezt *rta:

Hi,

Can excel search which cells my answers belong to?

example:
A B C D E F
4 2 3 6 7 9

Lets say my ans is "3"

it will show "number 3 belong to (C,1)"



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Search returning ans in terms of Rows & Columns

If that UDF is gonna be used in a cell on a worksheet, then it won't work until
xl2002.

..Find doesn't work in xl2k and below if used in a function called from a cell on
a worksheet.

Stefi wrote:

That's another case!
I could solve it only with a UDF:

Public Function FindInRng(findrng As Range, ansrng As Range) As String
FindInRng = findrng.Find(What:=ansrng.Value, After:=findrng(1),
LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False, SearchFormat:=False).Address(False, False)
End Function

Usage (answer being in G1):

=findinrng(A1:F2,$G$1)

Adjust A1:F2 range to your needs!

Regards,
Stefi

Will ezt *rta:

stefi,

wat if i have a few rolls of number?

A B C D E F
1 5 6 7 8 9 10
2 11 12 13 19 20 21

i wan my ans to show; number 8 belong to D,1

I try to use ur formula but I cant get the result

"Stefi" wrote:

If your answer is in A2, then
=ADDRESS(1,MATCH($A$2,A1:F1,0),4,1)

gives C1.

Regards,
Stefi

Will ezt *rta:

Hi,

Can excel search which cells my answers belong to?

example:
A B C D E F
4 2 3 6 7 9

Lets say my ans is "3"

it will show "number 3 belong to (C,1)"


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Search returning ans in terms of Rows & Columns

Then it's up to Will either to use XL2003 or find somebody who can solve this
task with worksheet functions!
Stefi


Dave Peterson ezt *rta:

If that UDF is gonna be used in a cell on a worksheet, then it won't work until
xl2002.

..Find doesn't work in xl2k and below if used in a function called from a cell on
a worksheet.

Stefi wrote:

That's another case!
I could solve it only with a UDF:

Public Function FindInRng(findrng As Range, ansrng As Range) As String
FindInRng = findrng.Find(What:=ansrng.Value, After:=findrng(1),
LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False, SearchFormat:=False).Address(False, False)
End Function

Usage (answer being in G1):

=findinrng(A1:F2,$G$1)

Adjust A1:F2 range to your needs!

Regards,
Stefi

âžWill❠ezt Ã*rta:

stefi,

wat if i have a few rolls of number?

A B C D E F
1 5 6 7 8 9 10
2 11 12 13 19 20 21

i wan my ans to show; number 8 belong to D,1

I try to use ur formula but I cant get the result

"Stefi" wrote:

If your answer is in A2, then
=ADDRESS(1,MATCH($A$2,A1:F1,0),4,1)

gives C1.

Regards,
Stefi

âžWill❠ezt Ã*rta:

Hi,

Can excel search which cells my answers belong to?

example:
A B C D E F
4 2 3 6 7 9

Lets say my ans is "3"

it will show "number 3 belong to (C,1)"


--

Dave Peterson

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Search returning ans in terms of Rows & Columns

Or change the UDF

Public Function FindInRng(findrng As Range, ansrng As Range) As String
Dim oRow As Range
Dim iPos As Long
For Each oRow In findrng.Rows
On Error Resume Next
iPos = Application.Match(ansrng, oRow.Cells, 0)
On Error GoTo 0
If iPos 0 Then
FindInRng = Application.Substitute( _
Cells(oRow.Row, iPos).Address(, False), "$", ",")
Exit For
Else
findrng = ""
End If
Next oRow
End Function


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Stefi" wrote in message
...
Then it's up to Will either to use XL2003 or find somebody who can solve
this
task with worksheet functions!
Stefi


"Dave Peterson" ezt rta:

If that UDF is gonna be used in a cell on a worksheet, then it won't work
until
xl2002.

..Find doesn't work in xl2k and below if used in a function called from a
cell on
a worksheet.

Stefi wrote:

That's another case!
I could solve it only with a UDF:

Public Function FindInRng(findrng As Range, ansrng As Range) As String
FindInRng = findrng.Find(What:=ansrng.Value, After:=findrng(1),
LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False, SearchFormat:=False).Address(False, False)
End Function

Usage (answer being in G1):

=findinrng(A1:F2,$G$1)

Adjust A1:F2 range to your needs!

Regards,
Stefi

?zWill? ezt *rta:

stefi,

wat if i have a few rolls of number?

A B C D E F
1 5 6 7 8 9 10
2 11 12 13 19 20 21

i wan my ans to show; number 8 belong to D,1

I try to use ur formula but I cant get the result

"Stefi" wrote:

If your answer is in A2, then
=ADDRESS(1,MATCH($A$2,A1:F1,0),4,1)

gives C1.

Regards,
Stefi

?zWill? ezt *rta:

Hi,

Can excel search which cells my answers belong to?

example:
A B C D E F
4 2 3 6 7 9

Lets say my ans is "3"

it will show "number 3 belong to (C,1)"


--

Dave Peterson



  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Search returning ans in terms of Rows & Columns

Yes, it's a nice solution. The best thing should have been to ask Will what
version does he use!

Stefi


Bob Phillips ezt *rta:

Or change the UDF

Public Function FindInRng(findrng As Range, ansrng As Range) As String
Dim oRow As Range
Dim iPos As Long
For Each oRow In findrng.Rows
On Error Resume Next
iPos = Application.Match(ansrng, oRow.Cells, 0)
On Error GoTo 0
If iPos 0 Then
FindInRng = Application.Substitute( _
Cells(oRow.Row, iPos).Address(, False), "$", ",")
Exit For
Else
findrng = ""
End If
Next oRow
End Function


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Stefi" wrote in message
...
Then it's up to Will either to use XL2003 or find somebody who can solve
this
task with worksheet functions!
Stefi


"Dave Peterson" ezt *rta:

If that UDF is gonna be used in a cell on a worksheet, then it won't work
until
xl2002.

..Find doesn't work in xl2k and below if used in a function called from a
cell on
a worksheet.

Stefi wrote:

That's another case!
I could solve it only with a UDF:

Public Function FindInRng(findrng As Range, ansrng As Range) As String
FindInRng = findrng.Find(What:=ansrng.Value, After:=findrng(1),
LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False, SearchFormat:=False).Address(False, False)
End Function

Usage (answer being in G1):

=findinrng(A1:F2,$G$1)

Adjust A1:F2 range to your needs!

Regards,
Stefi

â?zWillâ? ezt Ã*rta:

stefi,

wat if i have a few rolls of number?

A B C D E F
1 5 6 7 8 9 10
2 11 12 13 19 20 21

i wan my ans to show; number 8 belong to D,1

I try to use ur formula but I cant get the result

"Stefi" wrote:

If your answer is in A2, then
=ADDRESS(1,MATCH($A$2,A1:F1,0),4,1)

gives C1.

Regards,
Stefi

â?zWillâ? ezt Ã*rta:

Hi,

Can excel search which cells my answers belong to?

example:
A B C D E F
4 2 3 6 7 9

Lets say my ans is "3"

it will show "number 3 belong to (C,1)"

--

Dave Peterson




  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 129
Default Search returning ans in terms of Rows & Columns

I am using 2003.

"Stefi" wrote:

Yes, it's a nice solution. The best thing should have been to ask Will what
version does he use!

Stefi


Bob Phillips ezt *rta:

Or change the UDF

Public Function FindInRng(findrng As Range, ansrng As Range) As String
Dim oRow As Range
Dim iPos As Long
For Each oRow In findrng.Rows
On Error Resume Next
iPos = Application.Match(ansrng, oRow.Cells, 0)
On Error GoTo 0
If iPos 0 Then
FindInRng = Application.Substitute( _
Cells(oRow.Row, iPos).Address(, False), "$", ",")
Exit For
Else
findrng = ""
End If
Next oRow
End Function


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Stefi" wrote in message
...
Then it's up to Will either to use XL2003 or find somebody who can solve
this
task with worksheet functions!
Stefi


"Dave Peterson" ezt *rta:

If that UDF is gonna be used in a cell on a worksheet, then it won't work
until
xl2002.

..Find doesn't work in xl2k and below if used in a function called from a
cell on
a worksheet.

Stefi wrote:

That's another case!
I could solve it only with a UDF:

Public Function FindInRng(findrng As Range, ansrng As Range) As String
FindInRng = findrng.Find(What:=ansrng.Value, After:=findrng(1),
LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False, SearchFormat:=False).Address(False, False)
End Function

Usage (answer being in G1):

=findinrng(A1:F2,$G$1)

Adjust A1:F2 range to your needs!

Regards,
Stefi

â?zWillâ? ezt Ã*rta:

stefi,

wat if i have a few rolls of number?

A B C D E F
1 5 6 7 8 9 10
2 11 12 13 19 20 21

i wan my ans to show; number 8 belong to D,1

I try to use ur formula but I cant get the result

"Stefi" wrote:

If your answer is in A2, then
=ADDRESS(1,MATCH($A$2,A1:F1,0),4,1)

gives C1.

Regards,
Stefi

â?zWillâ? ezt Ã*rta:

Hi,

Can excel search which cells my answers belong to?

example:
A B C D E F
4 2 3 6 7 9

Lets say my ans is "3"

it will show "number 3 belong to (C,1)"

--

Dave Peterson






  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Search returning ans in terms of Rows & Columns

Stefi

The "best" solution is one that works across all versions, not just Will's
version.


Gord Dibben MS Excel MVP

On Wed, 4 Apr 2007 07:10:03 -0700, Stefi
wrote:

Yes, it's a nice solution. The best thing should have been to ask Will what
version does he use!

Stefi


Bob Phillips ezt rta:

Or change the UDF

Public Function FindInRng(findrng As Range, ansrng As Range) As String
Dim oRow As Range
Dim iPos As Long
For Each oRow In findrng.Rows
On Error Resume Next
iPos = Application.Match(ansrng, oRow.Cells, 0)
On Error GoTo 0
If iPos 0 Then
FindInRng = Application.Substitute( _
Cells(oRow.Row, iPos).Address(, False), "$", ",")
Exit For
Else
findrng = ""
End If
Next oRow
End Function


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Stefi" wrote in message
...
Then it's up to Will either to use XL2003 or find somebody who can solve
this
task with worksheet functions!
Stefi


"Dave Peterson" ezt rta:

If that UDF is gonna be used in a cell on a worksheet, then it won't work
until
xl2002.

..Find doesn't work in xl2k and below if used in a function called from a
cell on
a worksheet.

Stefi wrote:

That's another case!
I could solve it only with a UDF:

Public Function FindInRng(findrng As Range, ansrng As Range) As String
FindInRng = findrng.Find(What:=ansrng.Value, After:=findrng(1),
LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False, SearchFormat:=False).Address(False, False)
End Function

Usage (answer being in G1):

=findinrng(A1:F2,$G$1)

Adjust A1:F2 range to your needs!

Regards,
Stefi

?zWill?? ezt *rta:

stefi,

wat if i have a few rolls of number?

A B C D E F
1 5 6 7 8 9 10
2 11 12 13 19 20 21

i wan my ans to show; number 8 belong to D,1

I try to use ur formula but I cant get the result

"Stefi" wrote:

If your answer is in A2, then
=ADDRESS(1,MATCH($A$2,A1:F1,0),4,1)

gives C1.

Regards,
Stefi

?zWill?? ezt *rta:

Hi,

Can excel search which cells my answers belong to?

example:
A B C D E F
4 2 3 6 7 9

Lets say my ans is "3"

it will show "number 3 belong to (C,1)"

--

Dave Peterson





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
comparing columns and returning max value [email protected] Excel Discussion (Misc queries) 2 October 13th 06 02:03 PM
Search Columns & Rows mully Excel Discussion (Misc queries) 1 February 3rd 06 11:38 AM
searching a large database with a long list of search terms [email protected] Excel Discussion (Misc queries) 34 January 10th 06 06:23 AM
FIND or SEARCH Returning Erroneous #VALUE? Patrick McDonald Excel Worksheet Functions 3 October 5th 05 06:27 PM
how to set up a vlookup table with 2 search terms? WendyL Excel Worksheet Functions 3 May 12th 05 01:08 PM


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