View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Condensing a data range with only a few nonzero values???

Try something like

Dim Rng As Range
Dim Dest As Range
Set Dest = Worksheets("Sheet2").Range("A1")
For Each Rng In Range("A1:X50").Cells '<< Change range as
required
If Rng.Value < 0 Then
Dest.Value = Rng.Value
Set Dest = Dest(2, 1)
End If
Next Rng


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Travis.Broersma"
wrote in message
...
I have a large range (24 columns by 50 rows) and the majority of
the cell
values are zero, but there are about 10-20 that are not.
However, these
10-20 values change position depending on other data. Does
anyone have a
macro that can find the cells that have values and put the
values into the
first column of another worksheet?