假設我們有一批學生，他們的生日在Excel中，我們需要計算學生的年齡。 通常，我們可以使用=（TODAY（）-B2）/365.25的公式來計算年齡。 但是，由於有些學生的生日不是偶然發生的，所以我們變得荒謬。 為避免錯誤，如果Excel中的單元格為空白，我們不必計算或忽略公式。
= IF（Specific Cell <>“”，Original Formula，“”）
在開始討論的情況下，我們需要輸入 = IF（B2 <>“”，（TODAY（）-B2）/365.25，“”） 到單元格C2中，然後將“填充手柄”拖動到所需的範圍。
另外，我們也可以將IF函數和原始公式組合為 = IF（Specific Cell =“”，“”，“原始公式”），在本例中，公式顯示為 = IF（B2 =“”，“”，（TODAY（）-B2）/365.25）.
You are guest
or post as a guest, but your post won't be published automatically.
To post as a guest, your comment is unpublished.· 2 months agoI am trying to return the earliest date in a range of dates in 6 columns based on the value of another column If I were to say it out loud it would be:If M6:M603 equals 1, then identify the minimum date in the following columns G6:L603 but do not count the value if the cell is blank and insert this into another sheet on the workbook. I get very close but it keeps returning the date 00/01/1900. Can anyone help?
To post as a guest, your comment is unpublished.· 11 months ago@Aamir.Ali002 Hi Aamir.Ali002,
You can find out the cells which are formula cells and return blank with a formula. Says the first cell is H2, and apply this formula =IF(AND(E2=0,ISFORMULA(E2)=TRUE),1,0), and then drag the cell handle to copy this formula to other cells.
Then sum the formula cells to get the total number of cells which are formula cells and return blank.
To post as a guest, your comment is unpublished.· 11 months agoHow to calculate Non Empty cells that contains formula?
To post as a guest, your comment is unpublished.· 1 years agoFinally worked out how to count a complex range of conditions over an extended period of time but only if the date of the events is not blank with this:
In other words, "count apples or oranges but not if column B (dates) is blank".
THANK YOU, it has been bugging me for weeks to get this so I can make a chart from a date in the past to infinity (so as not to have to keep adjusting the chart range each day as data is entered
To post as a guest, your comment is unpublished.· 1 years ago@israelroy Hi israelroy,
Would you describe your problems in detail? More information will help us understand your problem clear. Thank you!
To post as a guest, your comment is unpublished.· 1 years agohow about in months?
To post as a guest, your comment is unpublished.· 2 years agothank for share