draw red oval around cell based on multiple values

abdelfattah

Well-known Member
Joined
May 3, 2019
Messages
1,429
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
hello
I need macro to draw red oval based on multiple condition the range in columns a,b,c,d,e should draw for words and values (abc,fired, <50) and if is more than column contain oval then write in column f closed (bold, red font )
this is what I expected
SHAPE.xlsm
ABCDEF
1namecase1case2case3case4FINAL
2Ali2054absfiredCLOSED
3Omar4073preexisted
4Ahmed5034absexistedCLOSED
5Mahmoud6022absfiredCLOSED
SS
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A1:A7,A10:A1048576Cell ValueduplicatestextNO

I insert oval around cell but when I insert image not show you can depend on my explanation above
thanks in advance
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Hi Abdel,

why are you trying to do this with a shape? Why not use conditional formatting?

1606924674781.png


The formula in column G is:
G2: =IF(SUM(IF(C2<50,1,0),IF(D2<50,1,0),IF(E2="abs",1,0),IF(F2="fired",1,0))>1,"CLOSED","")

The conditional formatting for columns C2:Dxx: =C2<50
The conditional formatting for columns E2:Fxx: =OR(E2="abs",F2="fired")
and then set the format with red border and light red fill
 
Upvote 0
hi, sijpie I find difficulty with condition formatting and is is problem with oval shape ? moreover i have a problem with the first condition and the last condition
this is what i got after use all of formulas

SHAPE.xlsm
ABCDEF
1namecase1case2case3case4FINAL
2Ali2054absfired
3Omar4073preexisted
4Ahmed5034absexisted
5Mahmoud6022absfired
SS
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D2:E5Expression=OR(D2="abs";E2="fired")textNO
B2:C5Expression=B2<50textNO
F:FExpression=IF(SUM(IF(C2<50;1;0);IF(D2<50;1;0);IF(E2="abs";1;0);IF(F2="fired";1;0))>1;"CLOSED";"")textNO
A1:A7,A10:A1048576Cell ValueduplicatestextNO
 
Upvote 0
OK, I made an error copying your data. I added a column.
But you also made an error.

First: The Formula (NOT conditional formatting ) for F2:
=IF(SUM(IF(B2<50;1;0);IF(C2<50;1;0);IF(D2="abs";1;0);IF(E2="fired";1;0))>1;"CLOSED";"")

copy this down column F

Then for the conditional formatting:
Modify the one for column F to:
=F2="CLOSED"
Modify the one for D2:Ex to:
=OR(D2="abs";D2="fired")
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,895
Members
449,097
Latest member
dbomb1414

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