VBA Help - Look in Column A, if cell contains "total" Then Function

Johnny Thunder

Well-known Member
Joined
Apr 9, 2010
Messages
693
Office Version
  1. 2016
Platform
  1. MacOS
Hello Group,

I am working on a project and need some help.

I have a sheet that contains a pivot table Range A:Q and need code that will look in Column A for the string "Total" (will contain other text besides total) and then look in that specific Row columns F:Q and see if the cell is greater than or less than 50, if so, highlight the cell Yellow.

Any help is appreciated.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
i'm not sure how to do that with vba but maybe with conditional formatting try add this rule

Code:
=AND(ISNUMBER(SEARCH("Total",$A1)),A1>=50)

and apply it to the range =$A:$Q and pick a fill color to highlight it how you want

hope that works

EDIT: wait maybe just apply it to =$F:$Q
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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