Cond. Formatting w/ Formula not always working - Why?

KelMac

New Member
Joined
Aug 19, 2015
Messages
8
Office Version
  1. 365
Platform
  1. Windows
Let me try this again...

I have two spreadsheets (in 2 workbooks). One SS is a listing of Store Samples, the other is a Price List of products. On the pricing spreadsheet, I would like the cells in the Item number column to be highlighted if the cell contains text (regardless of case) that is found in the ItemNo column of the Store Samples.

I recently was able to get the following code to work… but it doesn’t work for some of the cells. Some are not highlighted even though they have text that is found in the samples column.
Code I am currently using: =COUNT(SEARCH(SAMPLES!$A$2:$A$230,PRICE!A1,3))

Is this the best formula I should be using, or does it just need to be tweaked?

Thanks in advance!!

Code:
Workbook: Store Samples – Tab: Material
|MFCTR       |PRODUCT      |COLLECTION    |TYPE              |ITEMNO     |COLOR/STYLE|
|Tarstrong   |Vinyl        |Simple        |Red House         |A9876      |RED        |
|Tarstrong   |Vinyl        |Simple        |Blue House        |A9875      |BLUE       |
|Tarstrong   |Vinyl        |Simple        |Green House       |C4567      |GREEN      |
|Tarstrong   |Vinyl        |Simple        |Yellow House      |C4568      |YELLOW     |
|Tarstrong   |Vinyl        |Simple        |Purple House      |B2020      |PURPLE     |
 
Workbook: Tarstrong Pricing – Tab: August
|MFCTR         |PRICE CLS     |CLS DESCRP   |ITEM #        |DESCRP 1    |DESCRP 2|
|Tarstrong     |LUX           |BEST         |TARB2020987   |HOUSE       |PURPLE  |
|Tarstrong     |LUX           |BETTER       |TARC4569123   |HOUSE       |BLACK   |
|Tarstrong     |LUX           |BEST         |TARA9876456   |HOUSE       |RED     |
|Tarstrong     |LUX           |GOOD         |TARA9879654   |HOUSE       |WHITE   |
|Tarstrong     |LUX           |BETTER       |TARA9875056   |HOUSE       |BLUE    |
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
if i get it right, in Pricing Sheet in the column ITEM# the code is always starting at 4th position and is 4 characters long, correct?

If so try this in Column Item# on sheet Pricing as conditional formatting (select from cell D2 to last cell):

=if(vlookup(mid(D2,4,4),SAMPLES!$D$5:$D$230,1,0)<>"#N/A",TRUE,FALSE)
 
Upvote 0
if i get it right, in Pricing Sheet in the column ITEM# the code is always starting at 4th position and is 4 characters long, correct?

If so try this in Column Item# on sheet Pricing as conditional formatting (select from cell D2 to last cell):

=if(vlookup(mid(D2,4,4),SAMPLES!$D$5:$D$230,1,0)<>"#N/A",TRUE,FALSE)

HolyExcel... I could kiss you right now!! :rolleyes:
The code is 5 characters long so I changed the 2nd 4 to a 5... but after that... it worked great!!! Thank you so much!!!
 
Upvote 0

Forum statistics

Threads
1,216,095
Messages
6,128,790
Members
449,468
Latest member
AGreen17

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