![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Posts: 62
|
Hi all
I have a range of different codes running down column A (starting in A4).The codes are all 12 digits long but have differing prefixes. (Eg, 1MAA66204AAD, 1HBC60583AAH,1HBA60758AAE,1HAT60925AAC). What I would like to do is highlight the entire row when a code begins with either 1HAT or 1HBA. Any ideas?? Many thanks Matt |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Sunny, spring-like Hull
Posts: 3,339
|
Select your entire sheet, click on format- conditional formatting and change 'Cell is' to 'Formula is'. Enter the following formula: -
=OR(LEFT($A1,4)="1HAT", LEFT($A1,4)="1HBA") Select your format. Then select your first three rows and click on Format-conditional Formatting and delete the formats for those rows. HTH. |
|
|
|
|
|
#3 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
Activate Format|Conditional Formatting. Select Formula Is for Condition 1. Enter as formula: =OR(LEFT($A4,4)="1HAT",LEFT($A4,4)="1HBA") Activate Format. Select the desired formatting. Activate OK, OK. |
|
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Mar 2002
Posts: 62
|
Works like a charm Mudface, thanks.
Aladin - Thanks also, but what was the difference? |
|
|
|
|
|
#5 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
|
|
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Mar 2002
Posts: 62
|
I'm attempting something similar where i need to identify any entries in column L that read "O-". I then need to highlight that entire row.
I seem to be missing the principles of what will be a simple formula. Can anybody give me shove in the right direction please? Thanks |
|
|
|
|
|
#7 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Sunny, spring-like Hull
Posts: 3,339
|
Do the same as before, then enter as the formula:
=LEFT($L1,2)="O-" |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|