Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3851756
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T17:12:43+00:00 2026-05-19T17:12:43+00:00

I am trying to convert the following code into python: Columns(C:C).Select Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlGreaterEqual

  • 0

I am trying to convert the following code into python:

            Columns("C:C").Select
            Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlGreaterEqual _
                , Formula1:="=50"
            Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
            With Selection.FormatConditions(1).Interior
                .PatternColorIndex = xlAutomatic
                .Color = 5296274
                .TintAndShade = 0
            End With
            Selection.FormatConditions(1).StopIfTrue = True

And I have the following python code for it:

                wb.ActiveSheet.Columns("F:AA").Select
            formula1 = "=50"
            wb.ActiveSheet.Columns("F:AA").FormatConditions.Add(excel.XlFormatConditionType.xlCellValue, excel.XlFormatConditionOperator.xlGreaterEqual, formula1,formula2)
            wb.ActiveSheet.Columns("F:AA").FormatConditions(excel.Selection.FormatConditions.Count).SetFirstPriority() 
            wb.ActiveSheet.Columns("F:AA").FormatConditions(1).Font.Bold = True
            wb.ActiveSheet.Columns("F:AA").FormatConditions(1).Italic = False
            wb.ActiveSheet.Columns("F:AA").FormatConditions(1).Font.Strikethrough = False
            wb.ActiveSheet.Columns("F:AA").FormatConditions(1).Font.TintAndShade = 0
            wb.ActiveSheet.Columns("F:AA").FormatConditions(1).Interior.PatternColorIndex = xlAutomatic
            wb.ActiveSheet.Columns("F:AA").FormatConditions(1).Interior.Color = 5296274
            wb.ActiveSheet.Columns("F:AA").FormatConditions(1).Interior.TintAndShade = 0
            wb.ActiveSheet.Columns("F:AA").FormatConditions(1).StopIfTrue = False

And I am getting the following error:

'<win32com.gen_py.Microsoft Excel 12.0 Object Library._Application instance at 0x174381576>' object has no attribute 'XlFormatConditionType'
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T17:12:43+00:00Added an answer on May 19, 2026 at 5:12 pm

    Probably change

    excel.XlFormatConditionType.xlCellValue
    excel.XlFormatConditionOperator.xlGreaterEqual
    

    to

    win32com.client.constants.xlCellValue
    win32com.client.constants.xlGreaterEqual
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to convert the following list into a select list so it can
I am trying to convert this C code I have into a python script
I'm trying to convert someone's Ruby code into my Python code. The originally developer
HI, I am trying to convert the following vba code to c# and i
I'm trying to convert the following code from OpenGL 1.5 spec. to the OpenGLES
Trying to convert this c code into MIPS and run it in SPIM. int
I am trying to use the following code to convert a hash of options
I am trying to convert the following code for the variance calculation public static
I have the following Transact-Sql that I am trying to convert to LINQ ...
I'm trying to convert old QuickTime framework code to the 64-bit Cocoa-based QTKit on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.