returning cell number

professor02

New Member
Joined
Mar 27, 2002
Messages
15
I have a list with either a "GO" or "STOP" in a particular cell. This is an extraordinarily long list, so I need to know which cells have "GO" in them. How can I get a list of those cell numbers?
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
alrighty, in another cell somewhere use the following (i assume your list is in column B, as an example)...

=COUNTIF("B:B","GO")

play with it, you can put any range and any value to search for.
 
Upvote 0
I assume you know the Column your list is in. Let's Say Col A beginning with A2. In B2 (Insert a temporary col if needed) enter
=IF(A2="GO"),"A"&ROW(),""). Copy down the page. This will place the Cell address next to each cell in Col A that contains "GO". You can then copy this coluumn to a new location, remove the blanks and produce your list.
 
Upvote 0
Thanks for the help. That solves of returning th cell address. Unfortunately, the lists are incredibly long (like 12000 rows), so it would be difficult to copy, paste, and take out the blanks of the lists. Is there an easier way to get excel to put the addresses in a range of cells (I know that only 9 out of 12000 cells have "GO")?


On 2002-04-04 14:33, lenze wrote:
I assume you know the Column your list is in. Let's Say Col A beginning with A2. In B2 (Insert a temporary col if needed) enter
=IF(A2="GO"),"A"&ROW(),""). Copy down the page. This will place the Cell address next to each cell in Col A that contains "GO". You can then copy this coluumn to a new location, remove the blanks and produce your list.
 
Upvote 0
Thanks for the help. That solves of returning th cell address. Unfortunately, the lists are incredibly long (like 12000 rows), so it would be difficult to copy, paste, and take out the blanks of the lists. Is there an easier way to get excel to put the addresses in a range of cells (I know that only 9 out of 12000 cells have "GO")?


On 2002-04-04 14:33, lenze wrote:
I assume you know the Column your list is in. Let's Say Col A beginning with A2. In B2 (Insert a temporary col if needed) enter
=IF(A2="GO"),"A"&ROW(),""). Copy down the page. This will place the Cell address next to each cell in Col A that contains "GO". You can then copy this coluumn to a new location, remove the blanks and produce your list.
 
Upvote 0
You could use VBA, pretty simple:

Sub FindGo()
Dim counter As Integer
Dim rng As Range
Set rng = Intersect(ActiveSheet.UsedRange, Columns("a"))
For Each c In rng
If UCase(c.Value) = "GO" Then
counter = counter + 1
Range("b" & counter).Value = c.Address
End If
Next c
End Sub
 
Upvote 0

Forum statistics

Threads
1,213,559
Messages
6,114,302
Members
448,564
Latest member
ED38

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top