Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 193
Default Display the Cell Number of Cell if Value =Value

I need to figure out a way to look at a range of cell values (all numbers)
and return the cell number of where it falls within the list.

Reference list in Column X (X3:x25000)
# to look for in Cell Z10

Bsically if Z10 id found in X45, X76 and X5000; return 45,76,5000 in
adjacent cells.

I would like the cell #'s found to be listed next to the look for # either
in line or row format.

Does anyone have a code for this?

TIA
--
Pete
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default Display the Cell Number of Cell if Value =Value

Hi Pete,

In Y3:

=IF(X3=Z$10,Row(),"")

Copy down as far as needed

--
Kind regards,

Niek Otten

"Pete" wrote in message
...
I need to figure out a way to look at a range of cell values (all numbers)
and return the cell number of where it falls within the list.

Reference list in Column X (X3:x25000)
# to look for in Cell Z10

Bsically if Z10 id found in X45, X76 and X5000; return 45,76,5000 in
adjacent cells.

I would like the cell #'s found to be listed next to the look for # either
in line or row format.

Does anyone have a code for this?

TIA
--
Pete



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Display the Cell Number of Cell if Value =Value

Enter:

Sub collectum()
Dim r As Range
Dim i, j As Long
Set r = Selection
v = r.Value
j = 1
For i = 3 To 25000
If v = Cells(i, "x").Value Then
r.Offset(0, j).Value = i
j = j + 1
End If
Next
End Sub

Put you target value in Z10 ( or any other cell to the right of column X),
Select that cell and run the macro. AA10, AB10, AC10,...will be filled with
matching row numbers.

--
Gary's Student


"Pete" wrote:

I need to figure out a way to look at a range of cell values (all numbers)
and return the cell number of where it falls within the list.

Reference list in Column X (X3:x25000)
# to look for in Cell Z10

Bsically if Z10 id found in X45, X76 and X5000; return 45,76,5000 in
adjacent cells.

I would like the cell #'s found to be listed next to the look for # either
in line or row format.

Does anyone have a code for this?

TIA
--
Pete

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
display date of today in cell X when number 0 in cell Y anneleen machiels Excel Worksheet Functions 2 June 3rd 11 12:43 AM
display text in one cell as a number in an adjacent cell in excel Denno New Users to Excel 1 November 16th 06 05:13 PM
have one cell display text which reflects a number in another cell excelrookie Excel Discussion (Misc queries) 3 September 25th 06 05:49 PM
a cell to display number of days in a month given in another cell sudip Excel Worksheet Functions 1 September 5th 06 03:54 PM
display a number in one cell as text in more than one cell? Storm Excel Discussion (Misc queries) 6 July 6th 06 03:08 PM


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