conditional-formatting

Conditionally formatting text strings from Excel using python

假如想象 提交于 2020-01-10 15:41:12
问题 I would like to format a spreadsheet (xls or xlsx) so that any cells containing a word or ending with a certain string are formatted by filling the background with a specific color. For example, if the cell contains the word 'deleted', fill it black and paint the text white. if the cell ends with '.pf', paint the cell red. I found a similar question from several years ago that suggested the following: import xlrd import xlutils.copy inBook = xlrd.open_workbook('input.xls', formatting_info

Conditional Formatting based on relative column

*爱你&永不变心* 提交于 2020-01-07 09:35:17
问题 I have a sheet in which I created a conditional formatting rule: if columnB > 50 then columnA fill color green. The result is OK for the whole of columnA, based on columnB. The problem is that when I copy the format to columnX this should be based on columnY but remains based on columnB. I need an automatic way to format the cells based on the neighbouring column and not a fixed column. 回答1: Take the anchor ( $ ) off the front of your B in the formula for the formatting being copied before

How can I detect the results of Conditional Formating using VBA?

随声附和 提交于 2020-01-07 04:29:07
问题 I have an excel file that has conditional formating set up to put a check or an x in a cell. How can I create an if statement that will detect which is in there without using the original conditioning formulas? 回答1: You can use this homemade function to check if condition is filled: http://www.cpearson.com/excel/CFColors.htm 来源: https://stackoverflow.com/questions/3049023/how-can-i-detect-the-results-of-conditional-formating-using-vba

Highlight Duplicates Not Next To Each Other Using Conditional Formatting

旧巷老猫 提交于 2020-01-07 03:21:51
问题 We have a list of parts in Excel in a certain order. For reasons I won't get into, we need to highlight when there are duplicates that aren't next to each other. Currently, I'm using this formula in a conditional format to do the job. =AND(COUNTIF($A$2:$A$82,$A2)>1,$A1<>$A2,$A2<>$A3) This mostly works well except in cases where there are pairs of duplicates like in the example below, we would want FO-1694 to be highlighted, because they aren't all next to each other. But we would not want

VBA Conditional Formatting

孤者浪人 提交于 2020-01-06 19:41:55
问题 I am struggling to figure out an elegant way to apply conditional formatting rules via VBA. I prefer VBA because a) the rules will apply to multiple worksheets, and b) it prevents the CF duplication problem when copying/pasting between worksheets. I have a list of inventory items, all kept in different locations. I want to format based on location with the following formatting: Font color (will change for each location); Top border (same color as font); Bottom border (same color as font) Also

Excel dynamic conditional formatting based on cell version 2

耗尽温柔 提交于 2020-01-06 14:46:39
问题 A few months back I posted the following question Conditional formatting rows based on cell dynamic. At the time the formula provided was fantastic and still is however I'm redeveloping the spreadsheet and need something similar but I just can't figure out a solution. I currently have a list of times in column A in increments of 1 hour from 9am to 9pm. In column B I would type 2 next to 9am it would somehow highlight 9am and 10am, now under that say you type 7 next to 11am it would highlight

Excel dynamic conditional formatting based on cell version 2

╄→尐↘猪︶ㄣ 提交于 2020-01-06 14:44:31
问题 A few months back I posted the following question Conditional formatting rows based on cell dynamic. At the time the formula provided was fantastic and still is however I'm redeveloping the spreadsheet and need something similar but I just can't figure out a solution. I currently have a list of times in column A in increments of 1 hour from 9am to 9pm. In column B I would type 2 next to 9am it would somehow highlight 9am and 10am, now under that say you type 7 next to 11am it would highlight

Conditional formatting based on other column

我怕爱的太早我们不能终老 提交于 2020-01-06 07:14:35
问题 I have a table, that consists of 2 columns. I need to highlight values in first column, that are more or equal than 10% of the number in the second column. I created additional row there, to clarify, but I can't use it in the formula, tho. I need to use relative formula, since I am applying filter to these rows, so I need this all not to fall apart, if I am sorting table via filters. I have looked through this topic: Excel Conditional Formatting based on Other Column , but I couldn't apply it

Conditional formatting based on other column

限于喜欢 提交于 2020-01-06 07:13:51
问题 I have a table, that consists of 2 columns. I need to highlight values in first column, that are more or equal than 10% of the number in the second column. I created additional row there, to clarify, but I can't use it in the formula, tho. I need to use relative formula, since I am applying filter to these rows, so I need this all not to fall apart, if I am sorting table via filters. I have looked through this topic: Excel Conditional Formatting based on Other Column , but I couldn't apply it

Conditional Formatting Excel document via VB6 (issue with overwriting formats)

情到浓时终转凉″ 提交于 2020-01-05 19:23:58
问题 I'm creating an Excel document at runtime that has a bunch of values I'd like to have conditionally formatted. In going through various attempts from scratch as well as using/modifying code outputted from the Excel's macro recorder, I'm having a consistent issue related to formatting overwrites. I've posted a snippet of the code below and can say that I've tested to ensure my selection ranges are valid and appropriate for what I want conditionally formatted. There is some overlap but what's