excel-2013

Excel: Searching for multiple terms in a cell

旧巷老猫 提交于 2019-11-27 08:55:41
I use this handy equation to search for a term inside of a cell in excel. =IF(ISNUMBER(SEARCH("*Gingrich*",C1)),"1","") This equation searches for the presence of Gingrich in C1, if it exists, it displays a 1. All I'd like to do is search for more than one term at a time. Anyone know how to add an OR function into this so I can search for Gingrich OR Obama OR Romney etc... ? Another way =IF(SUMPRODUCT(--(NOT(ISERR(SEARCH({"Gingrich","Obama","Romney"},C1)))))>0,"1","") Also, if you keep a list of values in, say A1 to A3, then you can use =IF(SUMPRODUCT(--(NOT(ISERR(SEARCH($A$1:$A$3,C1)))))>0,"1

What does the number in the AddChart2 VBA macro represent?

断了今生、忘了曾经 提交于 2019-11-27 03:54:45
问题 I've use my Excel 2013 to record a macro in inserting a chart, a column-clustered chart in my case. In the view code option, it shows me a line of code as below: ActiveSheet.Shapes.Addchart2(286,xl3DColumnClustered).Select Please help me as I cannot understand what does the number 286 represent. I know the syntax of Addchart2 is: expression.AddChart2(Style,XlChartType,Left,Top,Width,Height,NewLayout) If I change the "286" to "285", the chart appears with a blue background. An error comes out

Check if cell contains Non-Alpha characters in Excel

六月ゝ 毕业季﹏ 提交于 2019-11-27 02:38:23
问题 Is there a Non-VBA way to check Col B and Col C to see if they contains any characters that are Non-Alpha? Just to clarify by Non-Alpha I mean anything not part of the alphabet(case insensitive). Col B and Col C is a list of First and Last Names. Some of these names have symbols or numbers in them through bad data entry. I am trying to find all the ones that need to be fixed. So I need to find the ones that contain ANYTHING that is not a letter. 回答1: There is a "weird" but simple and generic

Remove Duplicates from range of cells in excel vba

自闭症网瘾萝莉.ら 提交于 2019-11-27 02:06:14
I'm trying to remove duplicates in excel 2013 VBA. but I'm getting error "object does not support this property or method". The problem is I don't have static range to select. I want remove duplicates from the column heaader 'abcd'. Cells.Find(what:="abcd").Activate ActiveCell.EntireColumn.Select Set rng = Selection ActiveSheet.rng.RemoveDuplicates You need to tell the Range.RemoveDuplicates method what column to use. Additionally, since you have expressed that you have a header row, you should tell the .RemoveDuplicates method that. Sub dedupe_abcd() Dim icol As Long With Sheets("Sheet1") '<

How to script Excel 2013's Spreadsheet Compare?

99封情书 提交于 2019-11-27 02:00:37
问题 I'm trying to incorporate the fancy new Spreadsheet Compare function from Excel 2013's Inquire Add-in, into a VBA script. The plan is to have a macro to automate comparison between two spreadsheets with predefined names, and to export all the differences as a new spreadsheet. Without success, to date. Here's what I've tried so far: Normally, to learn how to automate some Excel functionality, I use Record Macro. If that fails, I look down the list of addable references, to see if I'm missing

If two cells match, return value from third

社会主义新天地 提交于 2019-11-27 01:28:41
Here's a simple explanation of what I'm having trouble with. Column A: List of 2300 order numbers Column B: Email Address associated with an order number Column C: List of 100 specific order numbers that I need the email address for So, I'm looking to search column A for a value that matches C, and return the email address from column B in a new column (D). The current formula almost works, but instead of returning the email address where A matched C, it returns the email address from the same row. =IF(ISERROR(MATCH(C2,A:A,0)),B2) Essentially I just need B2 in the formula above to return the

Excel.Application.Cells.SpecialCells(xlCellTypeLastCell) returning bottom of worksheet, not last data cell

独自空忆成欢 提交于 2019-11-26 21:44:47
问题 I'm writing a method in VBA in Excel 2013 to loop through the rows in two worksheets and compare the text in a column from each. However, when I loop through, I'm finding that the code is looping through the entire worksheet, not just the rows with data. Excel.Sheets("Sheet1").Cells.SpecialCells(xlCellTypeLastCell) returns a cell in the correct column, but the row is the last row in the sheet (1048576) rather than the last row with data (1951). I've written a check for empty cells into the

Use INDEX MATCH to find greater than/equal to value

江枫思渺然 提交于 2019-11-26 21:39:39
问题 I've been searching online and in Excel Help but cannot find whether this is possible. Given a list of numbers, values and a search term, I need to find the value whereby the value is greater than or equal to the search term. See the example: Excel returns Red but it should return Orange because 15 is greater than 10. Other desired result examples would be: 5 = Red (or N/A) 25 = Yellow 63 = Violet 15434 = Violet (or N/A) I realise that if I sort the list in descending order and use -1 for the

CustomTaskPane in Excel doesn't appear in new Workbooks

天大地大妈咪最大 提交于 2019-11-26 20:42:28
问题 I've added a CustomTaskPane to Excel 2013 that lets users quickly search for photos. It works well and fine if the user only opens/creates one workbook. Problem is if they open another workbook or create a new one, the task pane doesn't appear in the new window that appears. It simply stays put in the original window. I know this behavior is caused by the fact I was only initializing the panel upon opening Excel. I added an event handler to the ActiveWindow event to initialize a new panel

Generate 5000 records in 2 columns of random number that being unique

冷暖自知 提交于 2019-11-26 18:40:57
问题 How I can generate 5000 records in 2 columns of random numbers between 1 and 100 that being unique. For example: A B ---------------- 1 98 1 23 37 98 6 56 93 18 . . . . . . thanks 回答1: Here is a simple-minded approach using formulae. Whether it would be appropriate would depend on context. First in the Formulas tab set calculation options to 'Manual'. Put the following formula in a2:- =RANDBETWEEN(1,100) B is going to be a helper column. Put the following in B2:- =RANDBETWEEN(1,99) Column C