# 2.8 Formula वापरून Conditional Formatting

Source: https://ravindrabagale.com/mr/excel/ch02-data-entry-tools/2-8-formula-based-conditional-formatting.html
Language: mr (Marathi with English technical terms)

दुसऱ्या column वर आधारित rule किंवा पूर्ण row highlight करायची असेल तर formula वापरा. Formula ने TRUE किंवा FALSE दिलं पाहिजे. तो selected range च्या पहिल्या cell साठी लिहायचा असतो.

Cancelled order ची पूर्ण row highlight करा

Header वगळून A2:O5000 select करा.

Home › Styles › Conditional Formatting › New Rule… › Use a formula to determine which cells to format.

=$N2="Cancelled" हा formula द्या. Column N fixed आहे, पण row बदलू शकतो.

Format… मध्ये light grey fill आणि strikethrough font निवडा › OK › OK.

आणखी useful formulas

खालील formulas मध्ये selected range चा पहिला cell A2 आहे असं गृहीत धरलं आहे.

Pune मध्ये late delivery: =AND($D2="Pune",$M2>15).

Weekend orders: =WEEKDAY($B2,2)>5.

काल्पनिक Diwali practice date range: =AND($B2>=DATE(2026,11,6),$B2<=DATE(2026,11,12)).

Alternate rows: =MOD(ROW(),2)=0.

आपल्या city च्या average पेक्षा जास्त amount: =$K2>AVERAGEIF($D:$D,$D2,$K:$K).

R1 मध्ये निवडलेल्या city च्याच rows: =$D2=$R$1.

तुमची practice

Platform Amazon Now आणि Amount ₹500 पेक्षा जास्त असेल तर पूर्ण row highlight करा. मग R1 मध्ये City drop-down तयार करून फक्त त्या शहराच्या rows highlight करा.

Chapter recap

AutoFill आणि Series ने patterns भरा. Flash Fill एकदाच text वेगळं किंवा एकत्र करण्यासाठी वापरा. Validation आणि drop-downs ने entry consistent ठेवा. City → Area साठी INDIRECT किंवा FILTER वापरा. Conditional Formatting ने महत्त्वाच्या values दाखवा. Formula rules मध्ये $ चं स्थान तपासा.

रवींद्र बागले यांची tip

पूर्ण row साठी column fixed हवा: $N2. चुकून $N$2 लिहिलं तर सगळ्या rows चा colour फक्त N2 वर ठरेल. Selected range ची पहिली row कोणती आहे आणि formula कोणत्या row पासून लिहिला आहे हे दोन्ही जुळलं पाहिजे.
