worksheet-function

Round to two decimal places

蹲街弑〆低调 提交于 2020-01-05 04:36:11
问题 In the formula bar the data shows up as 69.849999999 and in the cell as 69.85 . I am trying to get that number in the formula bar as 69.85 . I tried Copy and Paste Values and almost everything else that I can think of. Even formatting the cell as a number with only two decimal places. Nothing is working. Any ideas? 回答1: Try: =ROUND(A1,2) then select, Copy, Paste Special, Values. 回答2: The following will radically change your data so use it with caution; possibly even on a backup copy until you

I want to compare two lists in different worksheets in Excel to locate any duplicates

て烟熏妆下的殇ゞ 提交于 2020-01-05 03:47:06
问题 I know this is very simple but I still need help: I have a list of properties that have finished a training. I need the names of the ones that have not done this training, but the system does not give me such a list. However, I have a list of all our properties. That means I have to compare two columns in different worksheets. The properties are identified by ID Numbers. What would make my life easier is that if there is a formula that can detect duplicates and highlight on the complete list

Return column header based on row header and cell value

我只是一个虾纸丫 提交于 2020-01-04 09:32:25
问题 I have the following grid of data: ---------Header 1 Header 2 Header 3 Header 4 Row 1 x x x Row 2 x x Row 3 x Row 4 x x x x I then have a second sheet that looks like this: Row 1 Row 2 Row 3 Row 4 I would like the second sheet to end up looking like this: Row 1 Row 2 Row 3 Row 4 Header 1 Header 2 Header 3 Header 1 Header 3 Header 3 Header 2 Header 4 Header 3 . Header 4 Ignore that last period, I just used it to format it properly. I've been playing with MATCH and INDEX for a couple hours and

Excel: COUNTIF function treats 'less than' character as an operator

蹲街弑〆低调 提交于 2020-01-03 17:01:41
问题 Pre-read note: I'm using LibreOffice rather than Excel, but most functions should apply to both. I'm making a spreadsheet where I have a bunch of data, and for every property (such as # of employees or a name) I need a function that calculates how many rows contain each distinct value. I already have the distinct values extracted, and now I'm using the following function to calculate how many rows have each value: =COUNTIF(start:end;value) . (Note that the semicolon is LibreOffice's way of

Different result from match search and check directly cell()

大兔子大兔子 提交于 2020-01-03 05:12:51
问题 For the below problem I mistakenly asked for a review in C.R., but they told me not to be the right place, so I extend to you the same question. I cannot find answers alone. this very simple code return 2 different results, why ?!?! I'll be crazy... Function FirstDay(t As String) As Boolean d = DateSerial(Left(t, 4), Mid(t, 5, 2), Right(t, 2)) - 1 FirstDay = False Var = Application.Match(d, Worksheets("Diary").Columns(1), 0) If Not IsError(Var) Then FirstDay = True End If 'this only to check

How to show current user name in a cell?

a 夏天 提交于 2019-12-31 13:43:43
问题 In most of the online resource I can find usually show me how to retrieve this information in VBA. Is there any direct way to get this information in a cell? For example as simple as =ENVIRON('User') (which did not work) 回答1: Based on the instructions at the link below, do the following. In VBA insert a new module and paste in this code: Public Function UserName() UserName = Environ$("UserName") End Function Call the function using the formula: =Username() Based on instructions at: https:/

Comparing computed dates with entered dates

两盒软妹~` 提交于 2019-12-31 06:22:33
问题 I have in cell p4 the date: 2014-01-01 (obtained via formula ( =(((O5/1000/60)/60)/24)+DATE(1970,1,1)) ) I have in cell b5 the date: 2014-01-01 (typed in) =(p4=b5) gives false =(p4>=b5) gives false How do I compare dates correctly in Excel? 回答1: You should be safe with chopping the parts up and reassembling them: =DATE(YEAR(P4),MONTH(P4),DAY(P4))=DATE(YEAR(B5),MONTH(B5),DAY(B5)) 回答2: Select the two date cells. Press CTRL+1 to show the format tab On the Number tab, in the Format list, click

Find the nearest set of coordinates in Excel

血红的双手。 提交于 2019-12-30 05:31:04
问题 There are two tables, each with a coordinate pair: longitude and latitude, in decimal degrees (i.e, 37.23222, -121,3433). How do I match table A with its nearest coordinate pair in table B? 回答1: You could try filling down this formula from G1 as shown below: =LOOKUP(1,1/FREQUENCY(0,MMULT((B$1:C$10-E1:F1)^2,{1;1})),A$1:A$10) For a more accurate formula that takes account of the circular distances try filling down from H1 : =LOOKUP(1,1/FREQUENCY(0,SIN((RADIANS(B$1:B$10-E1))/2)^2+SIN((RADIANS(C

Have Excel formulas that return 0, make the result blank

本秂侑毒 提交于 2019-12-30 03:10:09
问题 A recurring Excel problem I have is formulas such as INDEX(array,row,column) that return 0 when there's no result, rather than returning blank. What is the best way to change the zero result to blank? Here are approaches that I have tried so far: 1) Using division by zero. If INDEX returns 0, I cause an error that I then filter out. =IFERROR(1/1/INDEX(A,B,C),"") CONS: Makes the formula more messy and hides errors you may want to see. 2) Using custom formatting 0;-0;;@ CONS: 1) can't

Have Excel formulas that return 0, make the result blank

本小妞迷上赌 提交于 2019-12-30 03:10:08
问题 A recurring Excel problem I have is formulas such as INDEX(array,row,column) that return 0 when there's no result, rather than returning blank. What is the best way to change the zero result to blank? Here are approaches that I have tried so far: 1) Using division by zero. If INDEX returns 0, I cause an error that I then filter out. =IFERROR(1/1/INDEX(A,B,C),"") CONS: Makes the formula more messy and hides errors you may want to see. 2) Using custom formatting 0;-0;;@ CONS: 1) can't