Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Condensing a data range with only a few nonzero values???
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? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
find and replace nonzero values with 1 | Excel Worksheet Functions | |||
How to compute StDev of only nonzero entries in a range? | Excel Worksheet Functions | |||
Address of last nonzero value in a range | Excel Worksheet Functions | |||
Condensing a list of numbers into a range | Excel Discussion (Misc queries) | |||
Running average without nonzero values or empty cells | Excel Programming |