Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 28
Default Cell reference from 2 Lookups

Newbie

1. I would like to find a matching number in column C. I want the function
to return what row it was found in.

2. I would also like to find a matching number in row 3. I want the
function to return what column it was found in.

3. I then want to place a number in intersecting row and column found from
#1 and #2 above.

Let me give an example:

A B C D E F G
1 4
2 8
34 8 9 10 1 2 3
4 10
5 13
6 9 (N)

Let's say I want excel to search for the number 1 in row 3. It should
return the column it was found in which is E.

Let' say I want excel to search column C for the number 9. It should return
the row it was found in which is 6.

Then I want excel to enter another number let's call it (N) in the column
and row it found earlier which is E6.

Please help.
--
vze2mss6
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Cell reference from 2 Lookups

If you want Excel to automatically (as opposed to you entering it manually)
enter N, where is N stored? Presumably N is in a table or can be calculated?

"joesf16" wrote:

Newbie

1. I would like to find a matching number in column C. I want the function
to return what row it was found in.

2. I would also like to find a matching number in row 3. I want the
function to return what column it was found in.

3. I then want to place a number in intersecting row and column found from
#1 and #2 above.

Let me give an example:

A B C D E F G
1 4
2 8
34 8 9 10 1 2 3
4 10
5 13
6 9 (N)

Let's say I want excel to search for the number 1 in row 3. It should
return the column it was found in which is E.

Let' say I want excel to search column C for the number 9. It should return
the row it was found in which is 6.

Then I want excel to enter another number let's call it (N) in the column
and row it found earlier which is E6.

Please help.
--
vze2mss6

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 28
Default Cell reference from 2 Lookups

I'm sorry. N would be stored in A1.
--
vze2mss6


"Toppers" wrote:

If you want Excel to automatically (as opposed to you entering it manually)
enter N, where is N stored? Presumably N is in a table or can be calculated?

"joesf16" wrote:

Newbie

1. I would like to find a matching number in column C. I want the function
to return what row it was found in.

2. I would also like to find a matching number in row 3. I want the
function to return what column it was found in.

3. I then want to place a number in intersecting row and column found from
#1 and #2 above.

Let me give an example:

A B C D E F G
1N
2 8
34 8 9 10 1 2 3
4 10
5 13
6 9 (N)

Let's say I want excel to search for the number 1 in row 3. It should
return the column it was found in which is E.

Let' say I want excel to search column C for the number 9. It should return
the row it was found in which is 6.

Then I want excel to enter another number let's call it (N) in the column
and row it found earlier which is E6.

Please help.
--
vze2mss6

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Cell reference from 2 Lookups

This simply code would do it but how would you want it triggered? and where
are the co-ordinates placed? In my example they are in H1 (1) & H2 (9).

In your example 9 appears twice in column C: my test assumes onlly a single
occurence of a digit.

Sub Insert_N()
With Application
icol = .Match(Range("h1"), Range("3:3"), 0)
irow = .Match(Range("h2"), Range("C:C"), 0)
End With
Cells(irow, icol) = Range("a1")
End Sub

"joesf16" wrote:

I'm sorry. N would be stored in A1.
--
vze2mss6


"Toppers" wrote:

If you want Excel to automatically (as opposed to you entering it manually)
enter N, where is N stored? Presumably N is in a table or can be calculated?

"joesf16" wrote:

Newbie

1. I would like to find a matching number in column C. I want the function
to return what row it was found in.

2. I would also like to find a matching number in row 3. I want the
function to return what column it was found in.

3. I then want to place a number in intersecting row and column found from
#1 and #2 above.

Let me give an example:

A B C D E F G
1N
2 8
34 8 9 10 1 2 3
4 10
5 13
6 9 (N)

Let's say I want excel to search for the number 1 in row 3. It should
return the column it was found in which is E.

Let' say I want excel to search column C for the number 9. It should return
the row it was found in which is 6.

Then I want excel to enter another number let's call it (N) in the column
and row it found earlier which is E6.

Please help.
--
vze2mss6

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 28
Default Cell reference from 2 Lookups

Sorry about two different nines, actually there would be no duplicate numbers
so don't worry about that.

On your other question, I don't anticipate needing the coordinates again --
at least for now. I just want (N) placed at the proper co-ordinates.

Could it be triggered whenever a new number was placed at A1?

That leads to my next question. How and where would I place the function
you created? I believe in A1. Am I right?
--
vze2mss6


"Toppers" wrote:

This simply code would do it but how would you want it triggered? and where
are the co-ordinates placed? In my example they are in H1 (1) & H2 (9).

In your example 9 appears twice in column C: my test assumes onlly a single
occurence of a digit.

Sub Insert_N()
With Application
icol = .Match(Range("h1"), Range("3:3"), 0)
irow = .Match(Range("h2"), Range("C:C"), 0)
End With
Cells(irow, icol) = Range("a1")
End Sub

"joesf16" wrote:

I'm sorry. N would be stored in A1.
--
vze2mss6


"Toppers" wrote:

If you want Excel to automatically (as opposed to you entering it manually)
enter N, where is N stored? Presumably N is in a table or can be calculated?

"joesf16" wrote:

Newbie

1. I would like to find a matching number in column C. I want the function
to return what row it was found in.

2. I would also like to find a matching number in row 3. I want the
function to return what column it was found in.

3. I then want to place a number in intersecting row and column found from
#1 and #2 above.

Let me give an example:

A B C D E F G
1N
2 8
34 8 9 10 1 2 3
4 10
5 13
6 9 (N)

Let's say I want excel to search for the number 1 in row 3. It should
return the column it was found in which is E.

Let' say I want excel to search column C for the number 9. It should return
the row it was found in which is 6.

Then I want excel to enter another number let's call it (N) in the column
and row it found earlier which is E6.

Please help.
--
vze2mss6



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Cell reference from 2 Lookups

YES, It could be triggered by a change to A1. Code is below. Right click on
tab of your w/sheet, "View Code", and copy and paste code.

IT STILL requires you put the co-ordinates in H1 & H2 but these can be
changed to suit.


Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_Exit:

If Target.Address < "$A$1" Then Exit Sub
Application.EnableEvents = False

With Application
icol = .Match(Range("h1"), Range("3:3"), 0) '<=== change h1 if required
irow = .Match(Range("h2"), Range("C:C"), 0) '<=== change h2 if required
End With
Cells(irow, icol) = Range("a1")
ws_Exit:
Application.EnableEvents = True
End Sub

"joesf16" wrote:

Sorry about two different nines, actually there would be no duplicate numbers
so don't worry about that.

On your other question, I don't anticipate needing the coordinates again --
at least for now. I just want (N) placed at the proper co-ordinates.

Could it be triggered whenever a new number was placed at A1?

That leads to my next question. How and where would I place the function
you created? I believe in A1. Am I right?
--
vze2mss6


"Toppers" wrote:

This simply code would do it but how would you want it triggered? and where
are the co-ordinates placed? In my example they are in H1 (1) & H2 (9).

In your example 9 appears twice in column C: my test assumes onlly a single
occurence of a digit.

Sub Insert_N()
With Application
icol = .Match(Range("h1"), Range("3:3"), 0)
irow = .Match(Range("h2"), Range("C:C"), 0)
End With
Cells(irow, icol) = Range("a1")
End Sub

"joesf16" wrote:

I'm sorry. N would be stored in A1.
--
vze2mss6


"Toppers" wrote:

If you want Excel to automatically (as opposed to you entering it manually)
enter N, where is N stored? Presumably N is in a table or can be calculated?

"joesf16" wrote:

Newbie

1. I would like to find a matching number in column C. I want the function
to return what row it was found in.

2. I would also like to find a matching number in row 3. I want the
function to return what column it was found in.

3. I then want to place a number in intersecting row and column found from
#1 and #2 above.

Let me give an example:

A B C D E F G
1N
2 8
34 8 9 10 1 2 3
4 10
5 13
6 9 (N)

Let's say I want excel to search for the number 1 in row 3. It should
return the column it was found in which is E.

Let' say I want excel to search column C for the number 9. It should return
the row it was found in which is 6.

Then I want excel to enter another number let's call it (N) in the column
and row it found earlier which is E6.

Please help.
--
vze2mss6

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
Formulas that reference cells that reference another cell Andrea Excel Discussion (Misc queries) 7 October 19th 06 08:14 AM
absolute cell reference A spreadsheet cell reference that does no help Excel Discussion (Misc queries) 1 January 18th 06 06:56 PM
LOOKUPS - Creating LOOKUPs where two different values must BOTH be satisfied. Mr Wiffy Excel Worksheet Functions 2 May 16th 05 04:29 AM
problem with cell reference in =sum(offset(cell reference,x,y,z,a)). Want cell ref to be variable. [email protected] Excel Worksheet Functions 2 December 11th 04 12:05 AM
Problem with =sum(offset(cell reference,w,x,y,z). I want cell reference to be variable [email protected] Excel Worksheet Functions 2 December 11th 04 12:00 AM


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