Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Help with additional formatting

I seem to be having brain lock and cannot figure out how to add additional
formatting to the code.
Code below.
I'm looking for cells that contain markers and copying to a new worksheet.
I'm retaining the value of the cells and also would like to format the cells
with the "" marker as bold and LeftJustified.
Your suggestions would be greatly appreciated.

Dave

Sheets("Items").Activate
ktr = 8
Set percrange = Range(Cells(1, 1), Cells(150, 1))
For Each thing In percrange
If IsNumeric(thing) And (thing 0) Or (thing = "") Or (thing =
"") Then
ktr = ktr + 1
currrow = thing.Row
Range(Cells(currrow, 1), Cells(currrow, 9)).Select
Range(Cells(currrow, 1), Cells(currrow, 9)).Copy
Sheets("Order").Activate
Range(Cells(ktr, 1), Cells(ktr, 9)).PasteSpecial (xlPasteValues)
Sheets("Items").Activate
End If
Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default Help with additional formatting

Untested

Sheets("Items").Activate
ktr = 8
Set percrange = Range(Cells(1, 1), Cells(150, 1))
For Each thing In percrange

If (IsNumeric(thing) And thing 0) Or _
thing = "" Or thing = "" Then

ktr = ktr + 1
currrow = thing.Row
Range(Cells(currrow, 1), Cells(currrow, 9)).Copy
With Sheets("Order").Range(Cells(ktr, 1), Cells(ktr, 9))

.PasteSpecial (xlPasteValues)
.Font.Bold = True
.HorizontalAlignmnet = xlLeft
End With
End If
Next

--
__________________________________
HTH

Bob

"DaveH" wrote in message
...
I seem to be having brain lock and cannot figure out how to add additional
formatting to the code.
Code below.
I'm looking for cells that contain markers and copying to a new worksheet.
I'm retaining the value of the cells and also would like to format the
cells
with the "" marker as bold and LeftJustified.
Your suggestions would be greatly appreciated.

Dave

Sheets("Items").Activate
ktr = 8
Set percrange = Range(Cells(1, 1), Cells(150, 1))
For Each thing In percrange
If IsNumeric(thing) And (thing 0) Or (thing = "") Or (thing =
"") Then
ktr = ktr + 1
currrow = thing.Row
Range(Cells(currrow, 1), Cells(currrow, 9)).Select
Range(Cells(currrow, 1), Cells(currrow, 9)).Copy
Sheets("Order").Activate
Range(Cells(ktr, 1), Cells(ktr, 9)).PasteSpecial
(xlPasteValues)
Sheets("Items").Activate
End If
Next



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default Help with additional formatting

This code will find all the cells in column A that have "", using a
wildcard,
then copy Column A to Column I of that row to the first empty cell in
Sheet "Order"

Sub Button1_Click()
Dim s As String
Dim thing As Range, percrange As Range
Dim ws As Worksheet
s = ""
Set ws = Worksheets("Items")
Set percrange = Range(Cells(1, 1), Cells(150, 1))
For Each thing In percrange.Cells
If thing Like "*" & s & "*" Then
thing.Range("A1:I1").Copy Destination:=Worksheets
("Order").Range("A65536").End(xlUp).Offset(1, 0)
End If
Next
End Sub

This code will bold the first letter in Column A Sheets "Order"

Sub BoldFirstChracter()
Dim rg As Range, c As Range
Dim ws As Worksheet
Set ws = Worksheets("Order")
Set rg = ws.Range("A2", ws.Range("A65536").End(xlUp))
For Each c In rg.Cells
With c.Characters(Start:=1, Length:=1).Font
.FontStyle = "Bold"
End With
With c.Characters(Start:=2, Length:=20).Font 'assuming there
are no more than 20 charachter in the cell
.FontStyle = "Regular"
End With
Next
End Sub

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
Conditional Formatting (Dates) Repost with additional data BigH Excel Discussion (Misc queries) 1 January 29th 06 10:18 PM
Additional Conditions for Conditional Formatting eric beck Excel Worksheet Functions 1 July 25th 05 06:47 AM
AUTO FORMATTING WHEN ADDING ADDITIONAL ROWS DAZZA Excel Programming 2 June 7th 05 01:04 PM
Excel: Additional Conditional Formatting gjarrett Excel Worksheet Functions 1 April 6th 05 05:30 PM
additional help scrabtree23[_2_] Excel Programming 1 September 15th 04 08:27 PM


All times are GMT +1. The time now is 11:54 PM.

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

About Us

"It's about Microsoft Excel"