• Status: Solved
  • Priority: High
  • Security: Public
  • Views: 56
  • Last Modified:

Conditional Formatting Last 3 Cells

Conditional Formatting in Excel

Hello,

I want to highlight last 3 cells in a column. The data in columns will keep increasing.

Please find attached the Excel file for detailed query.

Thanks.
Highlight-Last-3-Weeks.xlsx
0
Sanjay Gandhi
Asked:
Sanjay Gandhi
  • 2
1 Solution
 
ShumsDistinguished Expert - 2017Commented:
Hi Sanjay,

Check in attached..Change the Cart from drop down...
SanjayGandhi_Highlight-Last-3-Weeks.xlsm
0
 
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
To apply conditional formatting as per your criteria, select the columns D:I and make a new rule for conditional formatting using the formula given below and set the format as per your choice.

=AND(D1<>"",COLUMN()=MATCH($D$4,$7:$7,0),ROW()>=MATCH("zzz",$C:$C)-2,ROW()<=MATCH("zzz",$C:$C))

Open in new window


Please find the attached for your reference.
Highlight-Last-3-Weeks.xlsx
0
 
Sanjay GandhiFounder, KenhalAuthor Commented:
Thanks Subodh,

In fact I wanted the solution without the macro which you have provided.

Thanks Shums, in case a requirement is there for a VBA solution, this will work fine.

Regards.
0
 
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
You're welcome Sanjay! Glad it worked as desired.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now