I tried. it is working but it is changing the font color of the content in the first row. in my application, as first line is generic line and second line contains header. I wanted to change the color of the font for the content in the secod row.
It is working . Thank You very much for your help. But I need macro for this function. I try the following code, but I am getting Syntax error. Could you please help me in fixing this.
sub Blank_Column()
max_columns = 100 'maximum columns that you expect to have in the sheet
j = 1
Do While j < max_columns
Selection.FormatConditions.Delete
If Selection.FormatConditions.Add _ Type:=xlExpression, Formula1:= "=COUNTA(j:j)-2 = 0" Then
Cells(2, j).Interior.ColorIndex = 6
Exit Do
End If
j = j + 1
Loop
Sector Region Country
Telecommunication USA USA
Telecommunication USA Canada
Transport Africa Kenya
Energy USA W.Indies
Finance Aus Aus
Finance Aus NZ
Commerce USA USA
Textiles USA Canada
Public sector Aus Aus
Aviation Europe France
Aviation Europe Germany
Agriculture Asia India
Agriculture Asia China
Technology USA USA
from the above table I wanted to filter the records where 'Secrtor' mapped to one region but 2 or more countries.
For Eg: from the above table I wnated to filter 'Telecommunication', Finance, Aviation, Agriculture etc.
Sector Region Country
Telecommunication USA USA
Telecommunication USA Canada
Transport Africa Kenya
Energy USA W.Indies
Finance Aus Aus
Finance Aus NZ
Commerce USA USA
Textiles USA Canada
Public sector Aus Aus
Aviation Europe France
Aviation Europe Germany
Agriculture Asia India
Agriculture Asia China
Technology USA USA
from the above table I wanted to filter the records where 'Sector' mapped to one region but 2 or more countries.
For Eg: from the above table I wnated to filter 'Telecommunication', Finance, Aviation, Agriculture etc.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.