Excel:通配符条件格式 [英] Excel: Wildcard Conditional Formatting

查看:174
本文介绍了Excel:通配符条件格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用通配符来格式化某些单元格-这是我在做什么:

I want to use a wildcard in order to format certain cells - here's what I am doing:


  1. 文件名输出到表格-这些文件名看起来像FileName = String1_numberstring_String2.csv

  2. 数字字符串是文本,例如20131019

  3. I想要加粗/标记一个周末的所有这些文件名。我已经在工作表的右侧有了一张表格,其中列出了我可以在公式中引用的周末数字字符串

  4. 这是我一直在处理的代码:(我认为使用通配符最适合字符串1 /字符串2,因为它会发生变化,但绝对可以接受建议-下面的 K5引用了一个调用周末数字字符串的单元格

  1. File names get outputted into a sheet - these file names look like FileName = String1_numberstring_String2.csv
  2. The numberstring is a text, like 20131019
  3. I want to bold/flag any of these file names that is on a weekend. I already have a table on the right of the sheet that brings out the weekend number strings that I could reference in a formula
  4. This is the code I have been messing with: (I think using a wildcard would work best for the string1 / string 2 because it changes, but definitely open to suggestions - "K5" below references a cell that calls out a weekend numberstring

= if(A:A = *& _& K5& _& *,1,0)


推荐答案

如果数字字符串是紧跟在第一个下划线之后的8个字符,则可以提取这8个数字

If the numberstring is the 8 characters immediately following the first underscore then you can extract those 8 digits with this formula

= MID(A1,FIND( _,A1)+1,8)

....因此要转换为日期并检查是否是周末,可以使用此公式

....so to convert to a date and check if it's a weekend you can use this formula

= WEEKDAY(TEXT(MID(A1,FIND( _,A1)+1,8), 0000-00-00),2)> 5

不需要周末列表...

No weekend list required......

这篇关于Excel:通配符条件格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆