Conditional Formatting or VBA ?

bamaisgreat

Well-known Member
Joined
Jan 23, 2012
Messages
834
Office Version
  1. 365
Platform
  1. Windows
I currently am using this conditional formatting (applies to =$A$4:$A$20)(formula =AND(A4=J4,A4<>"")
Example:
In A4 I have B3335 and J4 I have B3335 so it turns A4 Orange
The issue Im having is some times J4 may have for example B3335-100 so the formatting will not take place.
I need it were if the cell contains the same data as the other it will do the conditional formatting regardless if its exact. Thanks

If this could be fixed in conditional formatting that would be great. Thanks
 
I can't test it myself right now, but I would try adding something like:

=*&A4&* and use that to compare J4 to, that way if the text in A4 is contained in J4 at all it will highlight. Hope this helps.
 
Upvote 0
Assuming your are using Excel 2007 or higher, this should work:
Code:
=OR(IFERROR(SEARCH(A4,J4,1)>0,FALSE),IFERROR(SEARCH(J4,A4,1)>0,FALSE))

Otherwise, we will need to rewrite the IFERROR logic with IF(ISERROR logic (since IFERROR is a new function in Excel 2007).
 
Upvote 0
worked great, it only fill's A4. Is there away to make it fill both.. =AND(A4<>"",ISNUMBER(FIND(A4,J4)))
 
Upvote 0
You can add extra cells and/or ranges to the "applies to" part of the conditional formatting. Hope this helps.
 
Upvote 0
so the applies to is between the ""??? Example: =AND(A4<>"J4",ISNUMBER(FIND(A4,J4)))
to fill both A4 and J4
 
Upvote 0
worked great, it only fill's A4. Is there away to make it fill both.. =AND(A4<>"",ISNUMBER(FIND(A4,J4)))
You can apply the same formulas to column J to.
Or, if you lock down the column references, you can use the Format Painter to copy it from one to the other (i.e. $A4, $J4)
Or, highlight both sets of range at once, write the formula (as if applying it to the first row only), and make sure to use the absolute column references.
 
Upvote 0
I cant figure it out, I have the applies to looking like this =$A$4:$A$20,$J$4:$J$20 but it want fill the j4
This is my formula =AND(A4,J4<>"",ISNUMBER(FIND(A4,J4)))

Im confused
 
Upvote 0
You need to use absolute column references as Joe4 pointed out.
Make the formula
=AND($A4,$J4 < > "",ISNUMBER(FIND($A4,$J4)))
 
Upvote 0

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