#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default format in macro

Hi

this time with the coding

I am using the below code that I got off this forum. All works to my
requirements, except, in cell L31 on all of my sheets in the workbook shows
the value as a percentage, e.g. 31.16%
When runing the macro, I get the value in the summary sheet as 0.311615
Q. What alteration is required to the code and where abouts it be placed to
show the correct format?
I am not a code writer, nor understand them and only get by with copy and
paste, and therefore any help would be appriciated

thanks in advance

Sub Summary()
Dim ws As Worksheet
Dim i As Integer
i = 2
Sheets(1).Activate
Sheets.Add
With Sheets(1)
.Range("A1").Value = "Week"
.Range("B1").Value = "Released"
.Range("C1").Value = "Delivered"
.Range("D1").Value = "Del Late"
.Range("E1").Value = "Performance"
For Each ws In ThisWorkbook.Worksheets
If ws.Index < 1 Then
.Rows(i).Cells(1).Value = ws.Name
.Rows(i).Cells(2).Value = ws.Range("L30")
.Rows(i).Cells(3).Value = ws.Range("L27")
.Rows(i).Cells(4).Value = ws.Range("L29")
.Rows(i).Cells(5).Value = ws.Range("L31")
i = i + 1
End If
Next
End With
End Sub

Brian

--
bnt

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200612/1

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,726
Default format in macro

Responded in other thread.

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"brian thompson3001 via OfficeKB.com" <u15682@uwe wrote in message
news:6b0a507310fc1@uwe...
Hi

this time with the coding

I am using the below code that I got off this forum. All works to my
requirements, except, in cell L31 on all of my sheets in the workbook
shows
the value as a percentage, e.g. 31.16%
When runing the macro, I get the value in the summary sheet as 0.311615
Q. What alteration is required to the code and where abouts it be placed
to
show the correct format?
I am not a code writer, nor understand them and only get by with copy and
paste, and therefore any help would be appriciated

thanks in advance

Sub Summary()
Dim ws As Worksheet
Dim i As Integer
i = 2
Sheets(1).Activate
Sheets.Add
With Sheets(1)
.Range("A1").Value = "Week"
.Range("B1").Value = "Released"
.Range("C1").Value = "Delivered"
.Range("D1").Value = "Del Late"
.Range("E1").Value = "Performance"
For Each ws In ThisWorkbook.Worksheets
If ws.Index < 1 Then
.Rows(i).Cells(1).Value = ws.Name
.Rows(i).Cells(2).Value = ws.Range("L30")
.Rows(i).Cells(3).Value = ws.Range("L27")
.Rows(i).Cells(4).Value = ws.Range("L29")
.Rows(i).Cells(5).Value = ws.Range("L31")
i = i + 1
End If
Next
End With
End Sub

Brian

--
bnt

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200612/1



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2000 macro for page format slow [email protected] Excel Discussion (Misc queries) 2 October 6th 06 11:55 PM
how do I email amacro? leo Excel Worksheet Functions 24 August 9th 06 02:47 PM
Conditional Format as a MACRO Gunjani Excel Worksheet Functions 3 March 29th 06 05:22 PM
format macro Jonathan Cooper Excel Discussion (Misc queries) 5 January 9th 06 08:49 PM
Format Macro Buttons? Ken Excel Discussion (Misc queries) 5 March 2nd 05 08:40 PM


All times are GMT +1. The time now is 03:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"