View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
GTVT06 GTVT06 is offline
external usenet poster
 
Posts: 141
Default extract non zero valus from a list.

On Jun 1, 9:08*pm, TUNGANA KURMA RAJU
wrote:
I am looking for a funtion that retrives names from col (a:a) whose
corresponding values in Col(b:b) are not zero or blank.Please don't suggest
filtering,or sorting.


Not sure where you want to retrieve them to, so I wrote this code to
retrieve them to the immediate window, you can edit the code to fit
your needs. Or reply back and I can help make the adjustment.

Sub test()
Dim cell As Range
For Each cell In Range("A:A")
If cell < "" And cell.Offset(0, 1).Value < 0 Then
Debug.Print cell
Next cell
End Sub