Formula to highlight cells if display same value in a row

alhbeu

New Member
Joined
Jan 19, 2011
Messages
22
In columns F and H of a spreadsheet I have various currencies (e.g. USD, EUR, CHF). Column F always contains a currency, but column H does not have to and so is sometimes blank.
I need a formula that will highlight cells which have the same currency in a given row. Thus if there is only a currency in column F this is fine, or if there are different currencies in F and H also fine, but if F and H have the same value, both cells are highlighted.

Any ideas? I imagine conditional formatting is the way to go but no idea how to write the formula. Is it necessary to have the currencies as a named range to refer back to (and thus enter into the formula), is there just a way of seeing if the values in the cell are the same?

Also, for rows that do contain 2 currencies (F + H filled in), the value in that row's D must be "Cross Currency - Swap" - is there any way of incorporating that into the same formula or bit of code?
Would appreciate any help!
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Like so:
Excel Workbook
FGH
2USDCHF
3EURUSDEUR
4USDUSD
5CHF
6CHF
7USD
8
9
10
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F21. / Formula is =COUNTIF($F2:$H2,F2)>1Abc
 
Upvote 0
Hi, thanks for your help.
I have just tried it out but am a bit confused - is it supposed to highlight both cells? As I have entered it into the conditional formatter but it so far only highlights cells in F..
 
Upvote 0
1) Highlight F2:H10000
2) Open the conditional formatting window and enter the CF formula exactly as shown
3) Set your colors
 
Upvote 0

Forum statistics

Threads
1,215,575
Messages
6,125,616
Members
449,238
Latest member
wcbyers

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top