Re: $$Excel-Macros$$ Paste Special Data with 2 decimals (Permanently)

2012-01-24 Thread dguillett1
Message- From: Zafar Iqbal Sent: Monday, January 23, 2012 11:15 PM To: MS EXCEL AND VBA MACROS Subject: Re: $$Excel-Macros$$ Paste Special Data with 2 decimals (Permanently) I pasted this line in macro last portion as mentioned below:- Sheets(“sheet1”).UsedRange.Value = Sheets(“sheet1

Re: $$Excel-Macros$$ Paste Special Data with 2 decimals (Permanently)

2012-01-23 Thread Zafar Iqbal
il.com > > From: Sam Mathai Chacko > Sent: Monday, January 23, 2012 9:21 AM > To: excel-macros@googlegroups.com > Subject: Re: $$Excel-Macros$$ Paste Special Data with 2 decimals (Permanently) > > From what Don intended, I believe it is > > Dim i as long, lr as long, l

Re: $$Excel-Macros$$ Paste Special Data with 2 decimals (Permanently)

2012-01-23 Thread dguillett1
Subject: Re: $$Excel-Macros$$ Paste Special Data with 2 decimals (Permanently) >From what Don intended, I believe it is Dim i as long, lr as long, lc as long, mf as range Regards, Sam Mathai Chacko On Mon, Jan 23, 2012 at 8:47 PM, Zafar Iqbal wrote: Sir, Thanks for it. Just please gu

Re: $$Excel-Macros$$ Paste Special Data with 2 decimals (Permanently)

2012-01-23 Thread dguillett1
Thanks, Sam. That is correct. I USUALLY do use option explicit. Don Guillett SalesAid Software dguille...@gmail.com From: Sam Mathai Chacko Sent: Monday, January 23, 2012 9:21 AM To: excel-macros@googlegroups.com Subject: Re: $$Excel-Macros$$ Paste Special Data with 2 decimals (Permanently

Re: $$Excel-Macros$$ Paste Special Data with 2 decimals (Permanently)

2012-01-23 Thread Sam Mathai Chacko
>From what Don intended, I believe it is Dim i as long, lr as long, lc as long, mf as range Regards, Sam Mathai Chacko On Mon, Jan 23, 2012 at 8:47 PM, Zafar Iqbal wrote: > Sir, Thanks for it. Just please guide me about i, lr, lc and mf. I > think that first three are to be defined as int

Re: $$Excel-Macros$$ Paste Special Data with 2 decimals (Permanently)

2012-01-23 Thread Zafar Iqbal
Sir, Thanks for it. Just please guide me about i, lr, lc and mf. I think that first three are to be defined as integer. What will be mf? macro will run when we define these items. Regards, Zafar Iqbal On Jan 23, 6:07 pm, Sam Mathai Chacko wrote: > Zafar, your numbers are all coming correct. For t

Re: $$Excel-Macros$$ Paste Special Data with 2 decimals (Permanently)

2012-01-23 Thread Sam Mathai Chacko
Zafar, your numbers are all coming correct. For the date format, all you need to do is format the series to "d-mmm" Why do you need a macro for that? Keep the custom format, and it will always remain. Sam Mathai Chacko On Mon, Jan 23, 2012 at 8:15 PM, Zafar Iqbal wrote: > We have to define i,

Re: $$Excel-Macros$$ Paste Special Data with 2 decimals (Permanently)

2012-01-23 Thread Zafar Iqbal
We have to define i, lr, lc and mf. I tried with Dim i as integer, Dim lr as Inetger, Dim lc as Integer. But what is mf? I do not know. Please help. Thanks On Jan 23, 5:26 pm, "dguillett1" wrote: > Finds last row and last column and formats range and copies sheet1 to new > book without formulas.

Re: $$Excel-Macros$$ Paste Special Data with 2 decimals (Permanently)

2012-01-23 Thread dguillett1
, .Cells(lr, lc)).NumberFormat = "0.00" End If End With Next Sheets("Sheet1").Copy End Sub Don Guillett SalesAid Software dguille...@gmail.com -Original Message- From: Zafar Iqbal Sent: Monday, January 23, 2012 7:34 AM To: MS EXCEL AND VBA MACROS Subject: Re: $

Re: $$Excel-Macros$$ Paste Special Data with 2 decimals (Permanently)

2012-01-23 Thread Zafar Iqbal
Sir, Now, graph table is more correct. Last thing remaining is date format in graph. Right now, In graph table, date format (23-Jan) is converted to number format (40931). I need 23-Jan instead of 40931. Regards, Zafar Iqbal On Jan 23, 4:57 pm, Sam Mathai Chacko wrote: > Well, this should round

Re: $$Excel-Macros$$ Paste Special Data with 2 decimals (Permanently)

2012-01-23 Thread Zafar Iqbal
Dear Mr. *Sam Mathai Chacko,* Your macro works fine in parent file. When I copy Sheet1 only to new file, data in graph table needs a little attention. Dates are converted to numbers (23-Jan-2012 becomes 40931 and so on). Macro converted grapgh data to 2 decimals in parent file. However, in copied n

Re: $$Excel-Macros$$ Paste Special Data with 2 decimals (Permanently)

2012-01-23 Thread Sam Mathai Chacko
Well, this should round it. Replace it in the file I sent earlier. Sub FormatNumbersTo2Decimals() Dim wks As Worksheet Dim rng As Range For Each wks In ThisWorkbook.Worksheets For Each rng In wks.Cells.SpecialCells(2, 1) If IsNumeric(rng.Text) Then rng.N

Re: $$Excel-Macros$$ Paste Special Data with 2 decimals (Permanently)

2012-01-23 Thread Zafar Iqbal
Dear Sir, I have already tried it. Yet, as per your instructions, I did the same again. There are two problems. First is that decimals in print view are surely two only but in actual it may remains more than two in background. If we increase decimals places it will be viewable, again. I need result

Re: $$Excel-Macros$$ Paste Special Data with 2 decimals (Permanently)

2012-01-23 Thread Sam Mathai Chacko
Here's the macro. File attached too. Sub FormatNumbersTo2Decimals() Dim wks As Worksheet Dim rng As Range For Each wks In ThisWorkbook.Worksheets For Each rng In wks.Cells.SpecialCells(2, 1) If IsNumeric(rng.Text) Then rng.NumberFormat = "0.00"

Re: $$Excel-Macros$$ Paste Special Data with 2 decimals (Permanently)

2012-01-23 Thread dguillett1
2:58 AM To: excel-macros@googlegroups.com Subject: $$Excel-Macros$$ Paste Special Data with 2 decimals (Permanently) Dear Experts, Attached is an Sample file Excel-2003 with 03 Sheets linked with each others. Sheet1 is linked with data from Sheet2 by Hlookup / index formulas and it has Data Valida

Re: $$Excel-Macros$$ Paste Special Data with 2 decimals (Permanently)

2012-01-23 Thread NOORAIN ANSARI
Dear Zafar, First copy and value paste in New Sheet.. Again copy and Select data of new sheet and Format paste . Hope it will help to you. -- Thanks & regards, Noorain Ansari *http://excelmacroworld.blogspot.com/* *http://noorain-ansari.blogspot.com/*

$$Excel-Macros$$ Paste Special Data with 2 decimals (Permanently)

2012-01-23 Thread Zafar Iqbal
Dear Experts, Attached is an Sample file Excel-2003 with 03 Sheets linked with each others. Sheet1 is linked with data from Sheet2 by Hlookup / index formulas and it has Data Validation at Cell H1, too. Chart in this Sheet1 is also linked with Data at Sheet2. Sheet3 will get data by Paste Special