LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 852
Default Bold & increase font size of inStr(...) character's position

OneRng values are numbers 1 to 9, such as 123, 124567, 3, 123456789, 456.

If Range("P1") = 3 then I want the 3 in each cell that has a 3, for the 3 to be BOLD and font size to 14.

My change code MsgBox correctly returns the POSITION of the P1 value in each cell of OneRng.

I can't figure how to use that to do a FONT & BOLD for that position.

Thanks.
Howard

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count 1 Then Exit Sub
If Target < Range("P1") Then Exit Sub

Dim OneRng As Range, c As Range
Dim pInt As Long, pPos As Long

pInt = Range("P1")
Set OneRng = Range("E2:M10")

For Each c In OneRng
If InStr(c, pInt) 0 Then
pPos = InStr(c, pInt)

MsgBox pPos

Else
End If
Next

End Sub
 
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
Increase font size in a check box RBailey Excel Discussion (Misc queries) 0 March 13th 08 04:53 PM
Number in cell increase with increase in font size. Value increases with increase in font.[_2_] Excel Discussion (Misc queries) 2 August 9th 07 01:58 PM
Can you keep a cells BOLD Font, cell color size Trese Excel Discussion (Misc queries) 2 August 23rd 05 03:09 PM
change font size and bold in cell? R Doornbosch Excel Programming 7 February 10th 04 12:03 AM
Changing font size, bold and underline ChuckM[_2_] Excel Programming 1 December 17th 03 02:12 PM


All times are GMT +1. The time now is 09:03 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"