excel-2013

Remove Duplicates from range of cells in excel vba

坚强是说给别人听的谎言 提交于 2019-11-26 14:32:34
问题 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 回答1: You need to tell the Range.RemoveDuplicates method what column to use. Additionally, since you have expressed that you have a header row, you

Excel: Searching for multiple terms in a cell

烂漫一生 提交于 2019-11-26 14:15:33
问题 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... ? 回答1: Another way =IF(SUMPRODUCT(--(NOT(ISERR(SEARCH({"Gingrich","Obama","Romney"},C1)))))>0,"1","") Also, if you keep a

If two cells match, return value from third

耗尽温柔 提交于 2019-11-26 12:27:12
问题 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