excel-2007

COUNTIF with multiple criteria

╄→尐↘猪︶ㄣ 提交于 2019-12-23 12:28:46
问题 Can you please advise on how can I use COUNTIF with multiple conditions? My proposal (left) shows the formula for one criterion (distinct regions). However, I am interested in counting distinct regions for each distinct month (two criteria) - on the right: desired result. 回答1: you can use COUNTIFS instead =1/COUNTIFS($A:$A,A2,$B:$B,B2) 来源: https://stackoverflow.com/questions/17215915/countif-with-multiple-criteria

Missing Microsoft Excel as option in SQL Server data import tool

为君一笑 提交于 2019-12-23 12:15:55
问题 I'm running SQL Server 2012 on a 64bit Windows Server 2012 R2. I don't have MS Office installed. I now notice that when I start Start->Program Files->Microsoft SQL Server 2012->Import and Export Data (64-bit) the MS Excel file option is missing from the datasource dropdown. How can I get that option without having to install Excel or Office on my server? 回答1: Had to install this driver: https://www.microsoft.com/en-us/download/confirmation.aspx?id=13255 After that it works :) 来源: https:/

Open CSV file with correct data format for each column using TextFileColumnDataTypes?

一个人想着一个人 提交于 2019-12-23 12:06:40
问题 I am using the VBA-code below to open a csv-file in Excel (the code simulates the Data\Text to Columns - command). In the code it's necessary to specify an array for the property TextFileColumnDataTypes , which for every column in the csv-file specifies a data format (2 = text format). However, since I don't know how many columns the csv-file will have, I would like to specify the format 2 (= text format) for ALL columns in the csv-file. The problem right now is that I can only specify the

Color entire row based on the value of 2nd cell in that row?

半世苍凉 提交于 2019-12-23 05:09:16
问题 I have a list in Excel and I need to format rows based on the value in the cell 2 of that row. This is how data looks like No. | Name | Other data | Other data 2 | Date | Date 2 | For example, if Name=John Tery => color row as Red , if Name=Mary Jane => color row as Pink , etc. I tried using conditional formatting, but I did not know how to make this work. I have very little experience with such tasks in Excel. Can anyone help? PS. all name are two-word names 回答1: if there are only a few

How can I add symbols to a cell using closedxml?

守給你的承諾、 提交于 2019-12-23 04:59:10
问题 I am inserting data into a dummy excel. I need to append symbols before texts into some cell. Please let me know how can i achieve this using ClosedXML. 回答1: In ClosedXML, you can set this value with this code: ws.Cell(1, 1).Value = "❶ Symbol"; To enter the ❶, you can use the Windows program Character Map to select and copy the appropriate character. 来源: https://stackoverflow.com/questions/39489347/how-can-i-add-symbols-to-a-cell-using-closedxml

VBA - how to change tab color (across multiple tabs) based on formula/cell value

∥☆過路亽.° 提交于 2019-12-23 04:43:27
问题 I have a workbook that has multiple tabs - 50 raw data sheets and 50 "analysis" sheets that sit next to each data sheet (so data sheet 1, analysis sheet 1, data sheet 2, analysis sheet 2 and so on). I want to be able to have the tab color for each analysis sheet turn red if a master "bust" formula is triggered in each analysis tab. So if cell D25 in each analysis sheet was the location of that formula (which is something like =if(and(X=True, Y=True, Z=True),"True","False"), how can I write

Why aren't parentheses required for add method of dictionary class?

拜拜、爱过 提交于 2019-12-23 01:38:09
问题 The VBA syntax for the add method of the dictionary class is given as: Dictionary.Add (Key as String, Item as Variant) But actually including these parentheses generates a syntax error. So if D is an object of type dictionary, then vba expects: D.Add "key1", "value1" and not: D.Add("key1", "value1") <= this generates an error! Contrasting the Add method with Exists: Dictionary.Exists (Key as String) The parentheses are actually expected: V1 = D.Exists("key1") So why is it that the Add syntax

Compare two Columns and format matching cells with different colors

狂风中的少年 提交于 2019-12-22 23:26:07
问题 I would appreciate your help with the following: I would like to compare two columns, let us say Column A and Column B, **looking for duplicates**. If a value in Column A has a match value in Column B, I would like to format the cells of the same duplicate value with the color (the colors are random and different for each match). This is if `A12 = B30`, the color will be red. And if `A20 = B1`, the color is green and so on. If there is no match just leave it as it. That was only an example

Excel, multiple cells, one value

时光总嘲笑我的痴心妄想 提交于 2019-12-22 17:18:09
问题 I had no idea where to start in Googling... I have a workbook and want to have 2 cells on different sheets where if one is updated, so is the other. However I want to be able to change either cell and the other to update... Is this possible? 回答1: You can add a macro fired by the Worksheet Changed event which monitors for changes in either of those cells and copies the change to the other cell. MSDN Docs on Event 回答2: Open up your VB editor in Excel and use something like the following in each

How to remove a particular word in an Excel cell?

拈花ヽ惹草 提交于 2019-12-22 14:07:01
问题 How do you remove a particular word in a column of one cell that's in another cell in Excel. Example: if A1 = *1603 Ad street New York* , B1 = *New York* then in C1 I want = *1603 Ad street* 回答1: Use the Substitute function: =SUBSTITUTE(A1,B1,"") EDIT: Per brettdj's suggestion, added TRIM to get rid of leading or trailing spaces: =TRIM(SUBSTITUTE(A1,B1,"")) 回答2: Just use the Replace function. leave " replace with" blank 回答3: Try this formula for range of words: =TRIM(SUBSTITUTE(A1,INDEX($B$1: