ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Conditional format formula problem (https://www.excelbanter.com/excel-worksheet-functions/244560-conditional-format-formula-problem.html)

Romileyrunner1

Conditional format formula problem
 
Hi guys,
want to run something like this for a conditional format:


=IF(vlookup($B70,Rec!$N$10:$Q$89,4,false)="A")

Obviously it`s vlooking up the value of "A" up another worksheet.
This comes up with an error: highlighting the "A" part.
Is there a syntax error (probably).
Or is there a problem in running a condition from another worksheet?

Thanks.
RR1

Jacob Skaria

Conditional format formula problem
 
You cannot directly refer another sheet. Instead create a named range for
Rec!$N$10:$Q$89
(menu InsertNameDefine) Refers to Rec!$N$10:$Q$89 name as myRange.

Copy paste the below formula in CF condition1

=VLOOKUP($B70,myRange,4,0)="A"

If this post helps click Yes
---------------
Jacob Skaria


"Romileyrunner1" wrote:

Hi guys,
want to run something like this for a conditional format:


=IF(vlookup($B70,Rec!$N$10:$Q$89,4,false)="A")

Obviously it`s vlooking up the value of "A" up another worksheet.
This comes up with an error: highlighting the "A" part.
Is there a syntax error (probably).
Or is there a problem in running a condition from another worksheet?

Thanks.
RR1


Fred Smith[_4_]

Conditional format formula problem
 
You don't use If in a conditional format. You want an equation that
evaluates to True or False, as in:
=a16="A"

You can use a vlookup formula, as in:
=vlookup($b70,$n$10:$q$89,4,false)="A"

Unfortunately, you can't reference another worksheet in a conditional
format. If you need to do this, then do the Vlookup in another cell (say
B10), then use:
=$B$10="A"

However, what's the formula in the cell that you're applying conditional
formatting to? If it's the Vlookup formula itself, then simply use:
="A"

Regards,
Fred.

"Romileyrunner1" wrote in message
...
Hi guys,
want to run something like this for a conditional format:


=IF(vlookup($B70,Rec!$N$10:$Q$89,4,false)="A")

Obviously it`s vlooking up the value of "A" up another worksheet.
This comes up with an error: highlighting the "A" part.
Is there a syntax error (probably).
Or is there a problem in running a condition from another worksheet?

Thanks.
RR1



T. Valko

Conditional format formula problem
 
Well, you have a syntax error *plus* you're referencing another sheet.

The correct syntax would be:

=VLOOKUP($B70,Rec!$N$10:$Q$89,4,FALSE)="A"

However, even though you now have a syntax that will work Excel will
complain about referencing another sheet. You can get around that by giving
your lookup table a defined name.

InsertNameDefine
Name: LookupTable
Refers to: =Rec!$N$10:$Q$89
OK

Then use this as the CF formula:

=VLOOKUP($B70,LookupTable,4,FALSE)="A"

--
Biff
Microsoft Excel MVP


"Romileyrunner1" wrote in message
...
Hi guys,
want to run something like this for a conditional format:


=IF(vlookup($B70,Rec!$N$10:$Q$89,4,false)="A")

Obviously it`s vlooking up the value of "A" up another worksheet.
This comes up with an error: highlighting the "A" part.
Is there a syntax error (probably).
Or is there a problem in running a condition from another worksheet?

Thanks.
RR1





All times are GMT +1. The time now is 03:59 AM.

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