worksheet-function

How to import data from one sheet to another

独自空忆成欢 提交于 2020-01-23 06:58:25
问题 I have two different work sheets in excel with the same headings in in all the row 1 cells(a1 = id, b1 = name, c1 = price). My question is, is there a way to import data(like the name) from 1 worksheet to the other where the "id" is the same in both worksheets. eg. sheet 1 sheet2 ID Name Price ID Name Price xyz Bag 20 abc 15 abc jacket 15 xyz 20 So is there a way to add the "Name" in sheet 1 the "Name" in sheet 2 where the "ID" in sheet 1 = "ID" in sheet 2? Without coping and pasting of

Matching two columns in one sheet to two columns in another

ぃ、小莉子 提交于 2020-01-17 03:37:05
问题 I need to assign a status to a row based on a VLOOKUP query between two worksheets. The problem is that the identifier is not always unique. However, the identifier + a date value should be unique. I wanted to use: =VLOOKUP(A3&H3,'OtherSheet'!D:E,1,FALSE) with A3 being the identifier and H3 being the corresponding date. D in the other sheet is the identifier and E is the date column. However, I keep getting #N/A. Does this mean that there are no matches with the "identifier+date" or is Excel

vba use linest to calculate polynomial coefficients and index to output

南笙酒味 提交于 2020-01-17 03:23:41
问题 I have two rows of data, fracture pressure and depth. I have to code in vba to generate the polynomial (quadratic for this case) equation and then output the coefficients to the worksheet. I am using Linest and Index. For this two rows of data, I don't know how many datasets I have because I need to delete some noisy data first (the definition of noisy data is randomly so the number of datasets vary each time), so I can't use something like "A17:A80" in the linest function. However, it looks

Stop Excel from evaluating cell contents?

孤人 提交于 2020-01-15 07:54:26
问题 Is there a way to stop Excel 2010 from doing math on a bunch of cells containing multiple numbers with leading plus or minus signs? E.g. -706795 -1456130 -1869550 -936304 -1729830 -1737860 -687165 -16807800 Right now it sums the numbers up into one value. I would like them displayed as above. Formatting the cell as text doesn't work. I get this data from a CSV and have limited control over its contents... 回答1: Use the text import wizard to load each value into an individual column. You may

Differences between string representations of date/times

谁说我不能喝 提交于 2020-01-11 14:37:10
问题 In Excel 2007, I want the differences for the following string date/times: A B C 1 Date1 Date2 Difference of A and B 2 2009.11.28 01:25:46:0287 2009.11.28 01:25:46:0287 ? 3 2009.11.28 01:25:46:0443 2009.11.28 01:25:46:0443 ? I want the differences by converting strings to date/time and then the results as differences of two converted date/times. 回答1: A rather long-winded way to calculate zero (for the examples): =SUBSTITUTE(LEFT(A2,10),".","/")+MID(A2,12,8)+RIGHT(A2,4)/86400000-(SUBSTITUTE

How do I only count visible rows when using the COUNTIFS function?

大兔子大兔子 提交于 2020-01-10 03:47:26
问题 I've been using Excel's COUNTIFS function to count the number of rows in a table that meet certain criteria, E.g: =COUNTIFS(Table1[Result],"Fail", Table1[Comments], "") Now I want to modify this expression so that it only counts rows in Table1 that are visible. (I.E. Not filtered out.) How can I accomplish this? 回答1: Simple way is to add another column to table - e.g. called helper with a formula like this =SUBTOTAL(103, B2) where column B is Result column Now change formula to =COUNTIFS

Delete a row if the date does not match

倖福魔咒の 提交于 2020-01-06 11:01:58
问题 I've got about 20,000 lines of data ordered by date. Sometimes, there's a time mismatch (ie one time series is quoted more frequently than the other). I want to delete the row starting at column D if the time does not match that of column A. I've written the following code, but I'm getting errors (runtime error 1004). I'm not sure where's the problem. I think it might be the WorksheetFunction. Dim rng As Range Dim c As Variant Dim myVal As Boolean Sub rectifyData() Set rng = Range("A4:A20459"

MS Excel wildcard lookup

你说的曾经没有我的故事 提交于 2020-01-06 04:42:09
问题 I have a lookup table in Excel with ColA and ColB : ColA ColB ColC va 1 value1 ColC is the actual value table I need to do a wildcard lookup with lookup_value = "value1" I need to perform an operation that if the value of ColC matches the characters in ColA then it should return me ColB value, i.e. 1 I want to use wildcards in the lookup function to achieve this result. Any help will be appreciated! Thanks 回答1: You can use wildcards with VLOOKUP. You'll have to rearrange your table so that

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

Combine multiple VLOOKUPs

守給你的承諾、 提交于 2020-01-05 08:06:34
问题 How would I combine these together into one?: =IFERROR(VLOOKUP(B2:B11,Sheet2!A:B,2,FALSE),"No Match") =IFERROR(VLOOKUP(B3:B12,Sheet2!D:E,2,FALSE),"No Match") =IFERROR(VLOOKUP(B2:B11,Sheet2!G:H,2,FALSE),"No Match") These are just three but eventually I would need 12 in total to be joined as these are searching team names and there are 12 teams in total. 回答1: If you wish to work through each of the pairs of columns in order, for an example of three pairs, just: =IFERROR(VLOOKUP(B2:B11,Sheet2!A