excel-formula

IF formula on time cell not working

感情迁移 提交于 2020-01-06 05:28:23
问题 IF(AND(H$2>=$B2,H$2<=$C2),"X","") Works for 08:30-15:30 and 9:30-18:30 , but it does for shift 19:30-4:30 check the image (highlighted in yellow cell) 回答1: A "simple" solution would be to check if start is bigger than end . In that case, you will need to check for time >= start OR time <= end Something like : =IF( $B2<$C2; IF(AND(H$2>=$B2;H$2<=$C2);"X";""); IF(OR( H$2>=$B2;H$2<=$C2);"X";"") ) 回答2: Better to include date part into your formula of each cell showing time and re-format these

How to return a column value based on columns across multiple worksheets?

一个人想着一个人 提交于 2020-01-06 04:40:06
问题 I need to get a status with two conditions from separate worksheets or workbooks. I have an ID column, a Location column, and a Status column (column A (ID), column B (Loc), column C (Status)). When ID and location criteria are met, it should return the value of the Status column for that row. E.g. if this were a SQL query: SELECT Status from Source where IDsource=IDDestination && LocSource=LocDestination How can I accomplish this? I tried an if(and)) formula but to no avail. 回答1: If you

How to list all possible combinations of the values in FIVE columns in excel?

删除回忆录丶 提交于 2020-01-06 04:30:28
问题 There is a question and answer already out there, "How to list all possible combinations of the values in three columns in excel?" This formula works exactly how I want it to, but I need added two additional columns, but I am not able to fully understand the current formula to add an additional two new columns to the list. Current Formula works for 3 columns. It needs to be updated to include 5. =IFERROR(INDEX($A:$A,IF(INT((ROW(1:1)-1)/(((COUNTA(B:B)-1)*((COUNTA(C:C)-1)))))+2>COUNTA(A:A),-1

VBA - How to get the result of a formula ? (.Value always returns 0)

霸气de小男生 提交于 2020-01-06 04:04:23
问题 I want to get the result of a formula contained in a cell, but I always get 0 returned, instead of the real results. I have the following: Set c = .Cells (5,5) MsgBox (c.Formula) ' this return the following: = ASIN (W22-V22/$D$7)*180/PI() MsgBox (c.Value) ' this returns 0 MsgBox (c.Value2) ' this returns 0 as well And even if I try with Evaluate: evaluation = Application.Evaluate (c.Formula) MsgBox (c.Value) ' it still returns 0 回答1: Zero is the correct answer if both V22 and W22 are zero.

VBA - How to get the result of a formula ? (.Value always returns 0)

坚强是说给别人听的谎言 提交于 2020-01-06 04:03:09
问题 I want to get the result of a formula contained in a cell, but I always get 0 returned, instead of the real results. I have the following: Set c = .Cells (5,5) MsgBox (c.Formula) ' this return the following: = ASIN (W22-V22/$D$7)*180/PI() MsgBox (c.Value) ' this returns 0 MsgBox (c.Value2) ' this returns 0 as well And even if I try with Evaluate: evaluation = Application.Evaluate (c.Formula) MsgBox (c.Value) ' it still returns 0 回答1: Zero is the correct answer if both V22 and W22 are zero.

Excel - how to calculate a score based on two fields

独自空忆成欢 提交于 2020-01-06 03:33:07
问题 I'm trying to figure out how to calculate a field called "Risk Score" that is based on two different fields without using nested if loops. The two fields are "Likelihood of Risk" and "Impact of Risk" where the likelihood will be inputted as a % between 0-100% and the impact inputted as either high, medium, low. Below is an example of the two fields and the calculated fields: Below is the scoring I would like to derive in the third field based on the two fields. I don't think I could use Index

Splitting text columns

邮差的信 提交于 2020-01-06 02:38:17
问题 I have a very large file (8 million rows) I imported in PowerPivot with an address column I want to split: I tried LEFT and FIND but couldn't get the output as I wanted. 回答1: With data in A1, in B1 enter: =TRIM(MID(SUBSTITUTE($A1,"#",REPT(" ",999)),COLUMNS($A:A)*999-998,999)) and copy across. 回答2: Text to Columns with # as the delimiter might suit, though possibly with TRIM for each of the resulting cells. 回答3: Given that there is now(version 2010+) a menu command to do this, it can be done

Formula for monthly sum by person

徘徊边缘 提交于 2020-01-06 02:29:18
问题 I have an Excel page which consists of daily cash collections from different persons. My collection details are like below, in Excel: Date Name Amount 1/4/2014 Name1 500 5/4/2014 Name2 1000 10/4/2014 Name1 700 5/5/2014 Name2 300 12/5/2014 Name1 800 2/6/2014 Name1 200 1/6/2014 Name2 400 I need to display monthly total income from each person like so: Name Apr-14 May-14 Jun-14 Name1 1200 800 200 Name2 1000 300 400 I used this formula to find total income from each person: =SUMIF(B2:B8, A14, C2

find last row data [for the particular]/[filtered by] year in excel

余生长醉 提交于 2020-01-06 01:59:49
问题 In excel I have data as below. 2011 0 2011 15 2011 10 2011 5 2012 15 2012 10 2012 5 What I want to find is the last row for the respective year so that the output would be 2011 5 2012 5 Any idea how to get this done? I am looking at this post and found the way for finding last row data, however I need to know how to filter the same by year. Note : I want to do this using excel pre-defined function. NO macro, NO coding, NO pivot. Edit 1 =INDEX($B:$B,MAX(IF(LEN($B:$B)>0,ROW($B:$B),0)),1) gives

find last row data [for the particular]/[filtered by] year in excel

谁说我不能喝 提交于 2020-01-06 01:59:05
问题 In excel I have data as below. 2011 0 2011 15 2011 10 2011 5 2012 15 2012 10 2012 5 What I want to find is the last row for the respective year so that the output would be 2011 5 2012 5 Any idea how to get this done? I am looking at this post and found the way for finding last row data, however I need to know how to filter the same by year. Note : I want to do this using excel pre-defined function. NO macro, NO coding, NO pivot. Edit 1 =INDEX($B:$B,MAX(IF(LEN($B:$B)>0,ROW($B:$B),0)),1) gives