How can I rewrite the conditional formatting formula to use $A$1:$B$3 into the formula? Cell SH61 should be highlighted.

Status
Not open for further replies.

arthurz11

Board Regular
Joined
Nov 9, 2007
Messages
162
Office Version
  1. 2021
Platform
  1. Windows
I don't want to write the current formula three times. =ISNUMBER(SEARCH(" " &$A$1&","&$B$1&"-"," "&SH60)), =ISN =ISNUMBER(SEARCH(" " &$A$2&","&$B$2&"-"," "&SH60))UMBER(SEARCH(" " &$A$3&","&$B$3&"-"," "&SH60)). Just one formula so it searches the entire range. My actual data is 150 column and 20 rows. If I can figure out the short version, I should be able to do the rest.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Remove the $ from the row number:
=ISNUMBER(SEARCH(" " &$A1&","&$B1&"-"," "&SH60))
Then copy the formula down and it will automatically increment the row.
 
Upvote 0
Remove the $ from the row number:
=ISNUMBER(SEARCH(" " &$A1&","&$B1&"-"," "&SH60))
Then copy the formula down and it will automatically increment the row.
I was trying to edit but my time expired. So here it is Data is A1 is -20,B1 is 0, A2 is -19,B2 is -1, and A3 is -18, B3 is -1. This is a Conditional Formatting formula. =ISNUMBER(SEARCH(" " &$A1&","&$B1&"-"," "&SH60)). By the way this works just for on row. I don't want to write it three times in the Conditional Formatting formula. Just one which I can use A1:B3
 

Attachments

  • Picture1.png
    Picture1.png
    13.2 KB · Views: 2
Upvote 0
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,223,436
Messages
6,172,120
Members
452,445
Latest member
Behnam_nj764

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