简体   繁体   English

Excel统计和日期

[英]Excel countifs and dates

I've developed a small Excel presentation sheet, which uses some countifs formulas to look through rawdata that the users will be pasting into another sheet. 我已经开发了一个小的Excel演示文稿表,它使用一些countifs公式来浏览用户将粘贴到另一表中的原始数据。

My problem is that one of my countifs criteria is a date. 我的问题是我的条件之一是日期。 I simply need to test if a startup date has been entered for the given entry. 我只需要测试给定条目的启动日期是否已输入。 In my countifs formula i'm using: 在我的countifs公式中,我正在使用:

Rawdata!G:G;">10/1/2000"

This however doesn't count all users eventhough they have a startup date in G column. 但是,即使他们在G列中有启动日期,也不算所有用户。

例

The problem seems to arise when an entry's date looks like the top one in 1 . 当条目的日期看起来像1中的前一个日期时,似乎会出现问题。 (it's left adjusted) (它已调整)

If a edit the top date in 1 and manually put in 30-10-2014, the date will right align and the entry will be counted. 如果将最高日期修改为1并手动输入2014年10月30日,则日期将右对齐并计入条目。 This is not an option for a 1000+ lines data paste :) 这不是1000行以上数据粘贴的选项:)

I've made sure that the cells in the column G are formatted as dates (right clicking and format cells as), but it still seems as if some are different than the other. 我已经确保G列中的单元格格式设置为日期(右键单击并将单元格格式设置为日期),但是看起来好像某些单元格与另一单元格不同。

What I'm missing in making Excel understand that all values in G are dates? 使Excel理解G中的所有值都是日期时我缺少什么?

When a cell stores date as text (usually alligned to left), changing cell format won't help. 当单元格将日期存储为文本时(通常为左对齐),更改单元格格式将无济于事。 There are numerous ways to fix it: 有多种解决方法:

  • select column with wrong formatted dates, choose Data->Text to columns and in the last step select Date and in your case DMY 选择日期格式错误的列,选择“数据”- Data->Text to columns并在最后一步中选择“ Date ,在您的情况下选择DMY
  • another option is to enter 1 in any cell, copy this cell, select range with dates, choose Paste special->Multiply , format range as dates. 另一个选择是在任何单元格中输入1 ,复制该单元格,选择带日期的范围,选择“ Paste special->Multiply ,将范围设置为日期。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM