Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Search column...change row to BOLD


As ALWAYS, post YOUR code for comments and suggestions. Also, please tell us
your definition of a whole number. Examples

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Mike" wrote in message
...
I'm an amateur excel user and I've just taught myself how to create a
macro.
I have a bid program that I export a summary sheet to excel. I've set up
a
macro to format column widths and column colors. I want to add to this
macro
to search column A for WHOLE numbers. If the cell in column A is a whole
number, then I want to change that row to bold. Help please?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default Search column...change row to BOLD

Don, Here's the macro I have set up so far.
Sub Merge_Cells()
'
' Merge_Cells Macro
' Merge Cells for Cost Summary
'

'
Columns("C:D").Select
Selection.Delete Shift:=xlToLeft
Rows("2:2").Select
Selection.Insert Shift:=xlDown
Range("A1:A2").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = True
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = True
End With
Range("C1:C2").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = True
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = True
End With
Range("D1:D2").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = True
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = True
End With
Range("F1:F2").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = True
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = True
End With
Range("G1:G2").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = True
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = True
End With
Range("H1:H2").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = True
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = True
End With
Range("I1:I2").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = True
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = True
End With
Range("J1:J2").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = True
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = True
End With
Range("K1:K2").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = True
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = True
End With
Range("L1:L2").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = True
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = True
End With
Range("M1:M2").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = True
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = True
End With
Range("N1:N2").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = True
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = True
End With
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 1
Columns("A:A").Select
Selection.ColumnWidth = 7.57
Columns("B:B").Select
Selection.ColumnWidth = 35.29
Columns("C:C").Select
Selection.ColumnWidth = 12.14
Columns("D:D").Select
Selection.ColumnWidth = 6.71
Columns("E:E").Select
Selection.ColumnWidth = 10.43
Columns("F:F").Select
Selection.ColumnWidth = 14
Columns("G:G").Select
Selection.ColumnWidth = 11.43
Columns("H:H").Select
Selection.ColumnWidth = 12.71
Columns("I:I").Select
Selection.ColumnWidth = 11.71
Columns("J:J").Select
Selection.ColumnWidth = 12
Columns("K:K").Select
Selection.ColumnWidth = 15
Columns("L:L").Select
Selection.ColumnWidth = 17.57
Columns("M:M").Select
Selection.ColumnWidth = 13.14
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
Columns("N:N").Select
Selection.ColumnWidth = 11.86
Columns("N:N").Select
With Selection.Interior
.ColorIndex = 36
.Pattern = xlSolid
End With
Columns("L:L").Select
With Selection.Interior
.ColorIndex = 34
.Pattern = xlSolid
End With
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 1
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.75)
.RightMargin = Application.InchesToPoints(0.75)
.TopMargin = Application.InchesToPoints(1)
.BottomMargin = Application.InchesToPoints(1)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 600
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaper11x17
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
.PrintErrors = xlPrintErrorsDisplayed
End With

End Sub


This was made using the "Record New Macro" option from the tools menu. An
example that I have would include something like the following. Cell A13 =
1, Cell 14 = 1.1, Cell 15 = 2, Cell 16 = 2.1. In this case, I want to make
rows 13 and 15 bold. I need to search for whole numbers as the data varies
from one job to the next.

Thanks again.
"Don Guillett" wrote:


As ALWAYS, post YOUR code for comments and suggestions. Also, please tell us
your definition of a whole number. Examples

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Mike" wrote in message
...
I'm an amateur excel user and I've just taught myself how to create a
macro.
I have a bid program that I export a summary sheet to excel. I've set up
a
macro to format column widths and column colors. I want to add to this
macro
to search column A for WHOLE numbers. If the cell in column A is a whole
number, then I want to change that row to bold. Help please?



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
Search and change font color to Red and bold it CAM Excel Programming 1 June 28th 08 08:19 AM
Search for Change in a column. INTP56 Excel Programming 2 January 10th 08 01:14 AM
Tough One - search for string and BOLD it. JakeyC Excel Programming 0 January 11th 07 07:21 PM
Using [bold] as a criterion to search tevia Excel Discussion (Misc queries) 4 March 17th 06 02:59 PM
Change font to red and bold Derek[_3_] Excel Programming 1 July 10th 03 11:29 AM


All times are GMT +1. The time now is 09:28 AM.

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"