Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In message of Sun, 20 Sep 2009
10:47:42 in microsoft.public.excel.programming, Bernie Deitrick writes If you have other font details that you want to apply Ooops.... Hit send too soon! .....you need to do that on a detail by detail basis. Thanks to Joel , Bernie Deitrick , Rick Rothstein erizon.net for help. It took me a while to absorb the information. (I had forgotten to mention I use Excel 2003.) Joel's suggestion of POfInterest & .Cells(J, 2).copy _ destination:=POfInterest gave a syntax error. I am afraid I could not figure what was intended. Rick's suggestion of union frightened me as I had not used union before and found a seemingly undocumented restriction that all arguments to union must be on the same sheet. So I took your work, Bernie, in creating this code which - ugly as it is - does what I need. Somebody may propose some simplification ;) Private Sub ExpandQuestion() Dim I As Long Dim J As Long Dim K As Long Dim L As Long Dim SheetName As String Dim Scratch As Range For I = 1 To 4 SheetName = "3." & I If InStr(ActiveCell, SheetName) Then With Workbooks("foo.xls").Sheets(SheetName) Set Scratch = .Cells(1, 14) Scratch.Value = ActiveCell.Value For J = 3 To 12 If .Cells(J, 1) = 0 Then Scratch.Value = _ Scratch.Value & .Cells(J, 2).Value _ & .Cells(J, 14).Value Next K = Len(ActiveCell.Value) For J = 3 To 12 If .Cells(J, 1) = 0 Then For L = 1 To Len(.Cells(J, 2)) K = K + 1 Scratch.Characters(Start:=K, _ Length:=1).Font.Bold = _ .Cells(J, 2).Characters(Start:=L, _ Length:=1).Font.Bold Next For L = 1 To Len(.Cells(J, 14)) K = K + 1 Scratch.Characters(Start:=K, _ Length:=1).Font.Bold = _ .Cells(J, 14).Characters(Start:=L, _ Length:=1).Font.Bold Next End If Next Scratch.WrapText = ActiveCell.WrapText Scratch.Copy ActiveCell End With Exit For End If Next End Sub Thanks, again, for all the help. ;) -- Walter Briscoe |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
hardship letter explaining devastating loss property loss financi | Excel Discussion (Misc queries) | |||
grab detail when = 1 | Excel Worksheet Functions | |||
In Detail (what ever works please help) | Excel Programming | |||
Weight loss line chart to monitor weight loss progress | Charts and Charting in Excel | |||
Show detail | Excel Worksheet Functions |