ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Check 1 cells value and use the result to change another cells for (https://www.excelbanter.com/excel-programming/421638-check-1-cells-value-use-result-change-another-cells.html)

bigal

Check 1 cells value and use the result to change another cells for
 
I need help to create a program in Excel 2003 that will check the number in
one cell, and if more that ten, change the format of a previous cell in the
same row to bold.
And then continue to do the same until the end of the spreadsheet.
So the first Yes in column A will be bold but not the second Yes
A B C D
Yes xx yy 11
Yes xx yy 09
Thanks
BigAl

mudraker[_413_]

Check 1 cells value and use the result to change another cells for
 

Sub BoldFont()
Dim lLR As Long
Dim l4Row As Long

lLR = Cells(Rows.Count, "a").End(xlUp).Row
For l4Row = 1 To lLR Step 1
If Cells(l4Row, "d").Value 10 Then
Cells(l4Row, "a").Font.Bold = True
Else
Cells(l4Row, "a").Font.Bold = False
End If
Next l4Row
End Sub


--
mudraker

If my reply has assisted or failed to assist you I welcome your
Feedback.

www.thecodecage.com
------------------------------------------------------------------------
mudraker's Profile: http://www.thecodecage.com/forumz/member.php?userid=18
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=43607


bigal

Check 1 cells value and use the result to change another cells
 
Works like a charm. Thanks for your expertise.
BigAl


"mudraker" wrote:


Sub BoldFont()
Dim lLR As Long
Dim l4Row As Long

lLR = Cells(Rows.Count, "a").End(xlUp).Row
For l4Row = 1 To lLR Step 1
If Cells(l4Row, "d").Value 10 Then
Cells(l4Row, "a").Font.Bold = True
Else
Cells(l4Row, "a").Font.Bold = False
End If
Next l4Row
End Sub


--
mudraker

If my reply has assisted or failed to assist you I welcome your
Feedback.

www.thecodecage.com
------------------------------------------------------------------------
mudraker's Profile: http://www.thecodecage.com/forumz/member.php?userid=18
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=43607



mudraker[_415_]

Check 1 cells value and use the result to change another cells for
 

thanks for confirming the code solved your problem


--
mudraker

If my reply has assisted or failed to assist you I welcome your
Feedback.

www.thecodecage.com
------------------------------------------------------------------------
mudraker's Profile: http://www.thecodecage.com/forumz/member.php?userid=18
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=43607



All times are GMT +1. The time now is 12:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com