Copy cells with value <> 0 as a list

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!
0
canvas
1/20/2010 12:00:40 AM
excel 39879 articles. 2 followers. Follow

1 Replies
825 Views

Similar Articles

[PageSpeed] 1

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

-- 
Gary''s Student - gsnu200909


"canvas" wrote:

> 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!
> .
> 
0
Utf
1/20/2010 11:10:01 AM
Reply:

Similar Artilces:

Extract numeric value from single cell
Hello, I have numeric values within a text string in a single cell. There i no conformity to the length, or the make-up of the text. There is only ever 1 numeric value (that may vary in length from 1- digits long) within the text string. I have used the find function, but is getting vary messy. Is there numeric wildcard character I can use. Im using Excel 2000 Any help would be much appreciate -- Landyma ----------------------------------------------------------------------- Landyman's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=807 View this thread: htt...

order by case value
If I have the following: SELECT UserID as RID ,EnvironmentID as EnvID ,@authorType as RType ,'A' as Type ,'Author' as FullType ,Case When (isnull(FirstName, '') <> '' AND isnull(LastName, '') <> '') then LastName + ', ' + FirstName When (isnull(FirstName, '') <> '' AND isnull(LastName, '') = '') then FirstName When isnull(FirstName, '') = '' then LastName End as RName ,Email as EmailAddress FROM User WHERE EnvironmentID = @Environment...

Import/copy calendar in Outlook 2003
I got a new computer and installed Office 2003, and wanted to move my calendar to the new PC. I created a new data file called Personal Folders from Old PC. I wanted to copy my calendar OVER my current one in Personal Folders, but don't see a way to do so. I can copy my old calendar into the Pesonal Folders, but can't delete the new, empty Calendar. So I have Calendar, and Calendar 1 under my Personal Folders. Any way to just import/copy my reminders/appointments into my new calendar? Thanks for any advice. Ck G'Day Cathy, 1. Use the Folder List 2. Click on the OLD Cal...

Can I "unlock" just one cell in a protected worksheet?
Is there any way I can unlock just one cell in a protected worksheet without removing the protection from the entire worksheet? I am working on a fairly complex worksheet that has 10-15 data entry cells. The rest of the worksheet contains formulas and informational text. I have the formulas pretty much debugged and working. I am now down to making mostly cosmetic changes to the text and formatting. I have marked all of the data entry cells in a different color to help me keep from overwriting a formula, but it still happens occasionally. I usually catch it right away and can recover with ...

Truncating cells
Hello, I have a spreadsheet full of student names (Last, First, Middle) each in a separate column. I need to shorten the Middle Name column down to just the Middle Initial (1 character). It would be nice to do these using a function rather that edit them individually. I've tried the truncate function but could not get that to work. Any suggestions? Thanks, Matt Verdill Greetings, You need to use the LEFT function. In a new cell, type this formula: =LEFT(A1,1) Where A1 is the cell with the Middle Name and 1 is the number of characters. James Walker, Jr. "Matt Verdill...

Connector for MS Dynamics CRM 3.0 and MS Office Accounting 2007
Hi all, It seems that MS Dynamics CRM integration with other ERPs has been quite a talk here! We are also doing integration works for MS Dynamics CRM and MS OA2007. As we bridge the gap between the two solutions, we need CRM users, small business specialists and interested professionals who are willing to be advisors for this endeavor. Advisors will have the chance to influence the features of the software we are building and will get to evaluate pre-release versions of our application. If you are interested, you could visit our site for the advisor program: http://gurangosoft.com/advisor.as...

Picture behind text in Cells
Is there any way in which a picture can be sent behind the text in the worksheet cells? Or round the other way, is there any way to show the cells contents in front of a picture? Many thanks Bezza Format\sheet\background should do the trick RES That is a valid command. Unfortunately I've got numerous different images that need to be displayed behind cells. I need to use the cells so that the values displayed infront of the different pictures can be used in forumula's. Bezza That is a valid command. Unfortunately I've got numerous different images that need to be displaye...

DVD Copy Pro for Mac
[b]DVD Copy Pro for Mac[/b] is a DVD copy software that can support D9 to D5 compression. With simple operation, it can save DVD in four different ways including directly burning to DVD disc, saving as DVD folder, copying into DVD media format that can be played by DVD Player directly, and converting as ISO file for easy movie management. Now this cool Mac DVD Copy also supports the latest released Snow Leopard. You can download [b][url=http://www.dvd-copy-mac.net/download/dvd-copy-pro-mac.zip]DVD Copy Pro for Mac[/url][/b] freely right now. [b]More information:[/b][quote]http://www.dvd-...

Blocked Senders List
Internet Rumor has it that there is a limit to the Blocked Senders list in OWA. I can't find any documentation around OWA, just Outlook. I have seen two documents on Outlook, one says 512kb the other says unlimited. I believe the blocked list is held in the mailbox top level. Does OWA use the same restrictions as Outlook, is the list held in the mailbox top level (like the rules, or maybe with the rules). On Fri, 1 Sep 2006 14:58:01 -0700, Ken Wood <Ken Wood@discussions.microsoft.com> wrote: >Internet Rumor has it that there is a limit to the Blocked Senders list in &g...

Great Plains 9.0 MRP Setup for Purchased Items
We are setting up MRP in Great Plains 9.0 and have tested an MRP Full Generation for a 'Buy' Item and the MRP Exception Report shows an order type "MPO" with a message of "Release is past due". We were expecting an exception message related to Purchasing and to either cut the PO or expedite it. We've made sure that the item is set up as a 'Buy' item - are there other parameters that need to be set for this exception message to relate to purchasing? ...

Display Cell
How can I display text, for example 1.98 x 106 x T-0.63 (1.98 x 10 to the power 6 x T to the power -0.63)? Hi select these characters in the formular bar and goto 'Format - Cells - Font' -- Regards Frank Kabel Frankfurt, Germany "Excelhelp" <Excelhelp@discussions.microsoft.com> schrieb im Newsbeitrag news:3B96F0D2-F8DA-4901-873F-3391273E3FE1@microsoft.com... > How can I display text, for example 1.98 x 106 x T-0.63 (1.98 x 10 to the > power 6 x T to the power -0.63)? ...

Copy info from one workbook to another?
I have a problem I have a workbook with the function i want like a discribe here. The problem is i want to split the workbook but i don`t know how. Is it possible to have a main workbook with information from other workbooks at each worksheet? I have 20 workbooks with information. I would like to have a main workbook with on sheet1 every row from the 20workbooks with category1, on sheet2 every row from the 20workbooks with category2, etc, etc. The information in the 20workbooks in always only on sheet. The Colum in which the data is has no fix end. I go to fill in the rows trough a...

Secondary Copy
Hi, My customer using Great Plains modified report(Primary Copy). Now he wants new report something similar to the modified GP report with very few changes. I tried to copy the modified report and planned to use us a secondary copy. But the report has temp tables, so I am unable to make secondary copy. Can some one help me in how to make a new report something similar to the modified report, where to launch it. Whether it is possible throught VBA & Modifier? Regards Selvakumar.S A report with a temporary table can only be a primary copy. This is because only a primary copy can b...

local copy of mail
How do you store a copy of all your mail on you local computer when using Exchange? You setup an OST/Offline Folders file. Check with your mail admin if they support that configuration. "Brandon Baker" <brandon@discussions.microsoft.com> wrote in message news:epNKuJ19FHA.4004@TK2MSFTNGP14.phx.gbl... > How do you store a copy of all your mail on you local computer when using > Exchange? > ...

Calculate max value in specific range
Hi all, I've got a table with specific date values (start & end dates) like this: 3/23/00 Start 3/26/00 End etc. note: the length of days will vary from time tot time. -- I also have a table with all date values and corresponding numbers, like this: Column: A B Row: 1 3/23/00 1101.16 2 3/24/00 1106.16 3 3/25/00 1143.07 (=MAX) 4 3/26/00 1137.54 -- How can I calculate the max value from all those corresponding numbers between a Start- & End date? (1143.07 in this case) I've already tried the Vlookup and Max function but that only refers to 1 value (as...

Outlook 2000 SP3
How can I copy my mail and calendar to CD so that I can take my received and sent mail history to a new computer with Outlook installed? Thanks. >-----Original Message----- >How can I copy my mail and calendar to CD so that I can >take my received and sent mail history to a new computer >with Outlook installed? Thanks. >. > All your data saves in C:\Documents and Settings\Username\Local Settings\Application Data\Microsoft\Outlook\archive.pst and C:\Documents and Settings\Evgeni\Local Settings\Application Data\Microsoft\Outlook\outlook.pst You can either install instan...

Any idea why this is giving me a #Value! Error?
Function FrstLtrs(MyStr As String) As String Dim temp Dim i As Long TmpStr = Split(Trim(MyStr)) 'MsgBox "String" + TmpStr For i = 0 To UBound(TmpStr) If Not (UCase(TmpStr) = "OF") And Not (UCase(TmpStr) = "FOR") And Not (UCase(TmpStr) = "THE") And _ Not (UCase(TmpStr) = "AND") And Not (UCase(TmpStr) = "A") Then If Asc(Left(TmpStr(i), 1)) >= 65 And _ Asc(Left(TmpStr(i), 1)) <= 90 Then FrstLtrs = FrstLtrs & Left(TmpStr(i), 1) End If End If Next End Function Find the mo...

Copy picture ossice wizard
I have project 2007 standard edition, but the button is not working at all? Any suggestions Hi, The wizard is IMHO useless. Go to Roport, Copy Picture and do without the Wizard what millions have done before the Wizard existed. HTH -- Jan De Messemaeker Microsoft Project Most Valuable Professional +32 495 300 620 For availability check: http://users.online.be/prom-ade/Calendar.pdf "Enrique" <Enrique@discussions.microsoft.com> wrote in message news:72B5AA6C-67AE-468D-B6AE-FF16F52E57BD@microsoft.com... >I have project 2007 standard edition, but the bu...

Copy and paste versus copy and insert copied cells
What is the difference between these commands? Try them, it is pretty easy to see the difference -- Regards, Peo Sjoblom "Alana" <Alana@discussions.microsoft.com> wrote in message news:879FED29-5541-41B0-BB2C-7108D42ED593@microsoft.com... > What is the difference between these commands? ...

Blank cells in graph
I have a a line graph that displays customer behaviour in a number of categories. The data source for the graph is a table that refreshes every time a different 'customer' is selected from a macro drop-down list above the table, drawing data from another table. All the blank cells from the table are plotted as zero on the line graph, and I can't seem to change it so that the blank cells are not plotted on the line graph at all. I've tried going to Tools>Options>Chart, but the 'Plot empty cells as' options are all greyed out except for the 'Zero' opt...

subtotal copy and paste
Hi I have used the subtotal option in Excel and this is fine. I have also collasped the list so only the subtotal for each category is visible. However I want to copy and paste this list (just the subtotal) into another sheet When I do this it expands and shows all the results. Is it possible to just copy the visible bit. I have looked in paste special but no luck Cheers Hager On Jan 21, 6:38=A0am, Hager <Ha...@discussions.microsoft.com> wrote: > Hi > > I have used the subtotal option in Excel and this is fine. I have also > collasped the list so only the...

Copy above fails one way, copy below fails another way
I have a table of blood pressure readings that looks something like this: A B C D E 11 12 Averages: 134 83 74 13 R# Date Sys Dia Pul 14 4 8/17/08 138 87 72 15 3 8/15/08 130 84 76 16 2 8/12/08 137 83 70 17 1 8/11/08 129 79 76 Cell A14 contains =A15+1 Cell C12 contains =AVERAGE(C14:C17) Cell D12 contains =AVERAGE(D14:D17) Cell E12 contains =AVERAGE(E14:E17) Every time I take a new reading, I want to add a row to the top of the table, between row 13 (the header) and row 14 (the previous top row). I want to push a...

Deleting Range name's listed in the range address box.
In Excel, in the top corner of the application there is a box which list the name of a select range (e.g F19 etc..). when I use the querytables method to import a CSV onto a worksheet. This range address box, has the name of the data I have imported. when I use clear, or qyertytables delete to remove the imported data - I am unable to remove the name of the data appearing in the drop-down list for the range box. Is there anyway to delete this ? or is it not a problem ? I am concerned because I this rangelist seems to fill up pretty quickly with imported data ranges.. Choose Insert&...

Marketing Lists
We are exporting a marketing list through the "export to excel spreadsheet" tool in order to print mailing labels. When we try to export the marketing list we are getting all of the contacts in CRM. I have tried this on two different CRM environments and have the exact same results. It seems the query is returning all rows from the database and not the rows from the marketing list. Hi Gileon, Please make sure you are following the procedure below (assuming you're using the Outlook interface): 1. Expand the marketing folder 2. Click Marketing Lists 3. Double click the mar...

formula for cell
I have many cells with descriptive text, does anyone know of a formula where I can take for instance a cell with 500 characters and take only the first 30 and paste it in to a new cell. I have used a formula thanks to Gary =left(a1,len(a1)/2 which has worked for other uses I have--now I need to extract only the first 30 characters of a description and I have thousands of cells in my description column..Please Help =left(a1,30) Pete.Cornejo@gmail.com wrote: > > I have many cells with descriptive text, does anyone know of a formula > where I can take for instance a cell with 500...