finding multiple non-zero values in a column
This tiny function will give you the cell addresses of all non zero values:
Function nonzero(R As Range) As String
nonzero = ""
For Each rr In R
If rr.Value < 0 Then
nonzero = rr.Address
Exit Function
End If
Next
End Function
Regards,
Ryan---
--
RyGuy
"ij00mini" wrote:
I have a sales list for a customer and I need to find all of the items they
are getting via the column that shows "amount of units". Then I need to put
that number as well as the item name that corresponds to each amount in a new
sheet for project managers. The array looks like this:
/Unit/ /#/
Unit1 0
Unit2 3
Unit3 0
Unit4 0
Unit5 450
Unit6 0
To explain more fully, I need to find the non-zero values in column B
without rearranging either of these columns and then send the value from the
corresponding value in column A, as well as the number in column B to a new
sheet entitled "Project Manager"
The problem is that I need to have this formula in place for good. I also
can't affect the columns as they are, so none of them can get hidden. Thanks
for your help.
Thanks for any help.
|