Excel vba to color row based on wbs level
Closed
Ebti59
Posts
5
Registration date
Tuesday August 20, 2019
Status
Member
Last seen
August 26, 2019
-
Aug 21, 2019 at 01:54 PM
Blocked Profile - Aug 21, 2019 at 02:30 PM
Blocked Profile - Aug 21, 2019 at 02:30 PM
Related:
- Excel vba insert multiple rows based on cell value
- Number to words in excel formula without vba - Guide
- Insert gif in excel - Guide
- Vba case like - Guide
- Insert draft watermark in word on all pages - Guide
- Excel macro to create new sheet based on value in cells - Guide
1 response
Here is a simple one. It looks for "one" in cell A of each row.
Very simple.
Sub colortherow ()
Thecounter=findlastrow ("yoursheet")
for each RC in Range ("A1:A"& thecounter)
If RC.value ="one" then
RC.entirerow.interior.color=vbRed
End if
Next
End sub
Function findlastrow (whatsheet)
Findlastrow=thisworkbook.worksheets(whatsheet).cells.(rows.count,1).end (xlUp).row
End function
Very simple.