Welcome to Windows Help!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Copy cells with value 0 as a list

 
   Windows Help (Home) -> Microsoft Excel RSS
Next:  Virus infection on a T60 ==> how best to reins..  
Author Message
canvas

External


Since: Jan 19, 2010
Posts: 1



(Msg. 1) Posted: Tue Jan 19, 2010 4:00 pm
Post subject: Copy cells with value 0 as a list
Archived from groups: microsoft>public>excel (more info?)

Hi,

I have a sheet with some cells with value 0 and others with data. I
want a macro that copies all the cells with value <>0 in other sheet
but as a list, one under the other. Is this possible?

Thanks!

 >> Stay informed about: Copy cells with value 0 as a list 
Back to top
Login to vote
Garys Student

External


Since: Nov 19, 2008
Posts: 6



(Msg. 2) Posted: Wed Jan 20, 2010 3:10 am
Post subject: RE: Copy cells with value 0 as a list
Archived from groups: per prev. post (more info?)

Here is an example that you can adapt to your needs:

Sub moveUm()
Dim s1 As Worksheet, s2 As Worksheet
Set s1 = Sheets("Sheet1")
Set s2 = Sheets("Sheet2")
s1.Activate
Set rr = ActiveSheet.UsedRange
n = 1
For Each r In rr
v = r.Value
If v <> 0 Then
s2.Cells(n, "A").Value = v
n = n + 1
End If
Next
End Sub

 >> Stay informed about: Copy cells with value 0 as a list 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Adding up several cells - I'm sure this is really easy but I am getting into circular reference errors - I have two cells - one is a running total the other a user input figure that needs to be appended to the running total every time. so if the running total stands at 0, the....

Unlocking Cells - Hi, I'd like to know if there's a simple way to unlock or lock cells. I'm not sure if "Lock" is the correct term here. For example, if you have a formula that has C$14. Is there an easy way to unlock (remove the "$") from the formul...

fill blank cells in a column - hello, how can i fill specific blank cells in a column. i tried find/replace without success. thanks

How to Past cells with formulas not using "$" without chan.. - Hello, I would like to copy / past a large amount of cells in which "$" has not been used in formules. Problem : referenced are changed (because "$" is not there). Example in A1 : "=B1+C1" if I copy A1 to A50 : the con...

Excel 2008 hanges when deleting cells or rows -
   Windows Help (Home) -> Microsoft Excel All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]