Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
display date of today in cell X when number 0 in cell Y | Excel Worksheet Functions | |||
display text in one cell as a number in an adjacent cell in excel | New Users to Excel | |||
have one cell display text which reflects a number in another cell | Excel Discussion (Misc queries) | |||
a cell to display number of days in a month given in another cell | Excel Worksheet Functions | |||
display a number in one cell as text in more than one cell? | Excel Discussion (Misc queries) |