You are here:

# Excel/conditional formatting/array formulas

Question
Hi Tom

I have used the following formula to conditionally format a single cell in a worksheet:  =VLOOKUP(I2,BE8:BF60,2,FALSE)="Y"

I wish to apply this formula across an array of cells, "B12:AY61".  Is this possible?  I have tried =vlookup(b12:ay61,be8:bf60,2,false)="Y" but with no success.

Chris Mitchell

Christopher Mitchell

You need to use the proper absolute and relative references.

You don't want be8:bf60 to change, so it should be \$be\$8:\$bf\$60

I have no idea what cells you are conditionally formatting, but if it is B12:AY61, then you would select B12:AY61 with B12 as the activecell and enter your conditional formatting with the formula

=vlookup(b12,\$be\$8:\$bf\$60,2,false)="Y"

just like when you copy cells and paste them, the relative reference B12 will change.  In C12, the formula will appear as

=vlookup(C12,\$be\$8:\$bf\$60,2,false)="Y"

and in B13 it will appear as

=vlookup(B13,\$be\$8:\$bf\$60,2,false)="Y"

if you are formatting some other cells, but they are the same shape as B12:AY61, then the same approach would be used.  You would make the top left cell as the activecell with all the cells selected and enter the formula relative to the top left cell (the activecell).
=vlookup(b12,\$be\$8:\$bf\$60,2,false)="Y"

so that top left cell would be formatted based on the lookup of the value in B12 and so forth.

--
Regards,
Tom Ogilvy

--
Regards,
Tom Ogilvy

Questioner's Rating
 Rating(1-10) Knowledgeability = 10 Clarity of Response = 10 Politeness = 10 Comment As ever, your help is greatly appreciated.

This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

#### Tom Ogilvy

##### Expertise

Selected as an Excel MVP by Microsoft since 1999. Answering Excel questions in Allexperts since its inception in 2001. Able to answer questions on almost all aspects of Excel's internal capabilities. If seeking a VBA solution, please specify that in your question itself so I give you the answer you want. [Excel has weak protection - if you are distributing an application, I don't answer questions on how to protect your project from your users.]

##### Experience

Extensive experience.

Education/Credentials
Master of Science (MS) degree Operations Research (ORSA)

Awards and Honors
Microsoft MVP in Excel.