excel-2013

Excel - How to count number of rows in range (i.e. various columns) that contain certain string?

末鹿安然 提交于 2019-12-20 04:38:08
问题 I have a list A of strings and I want to see if and if yes in how many rows each string is represented in range B. My data looks something like this: List A: E 1 aaa 2 bbb 3 ccc Range B: A B C 1 aaa --- --- 2 bbb ccc bbb 3 aaa --- --- My desired result would be that in list A for "aaa" it would tell me 2, for "bbb" 1 and for "ccc" 1. Have been trying to do this with the below array formula but it doesn't seem to be working: =SUM(IF(COUNTIF(Range B,List A($A1)>0,1,0)) 回答1: As much as I like to

Excel 2013 worksheet activate

丶灬走出姿态 提交于 2019-12-18 16:59:24
问题 I have an issue with activating a sheet from a user form, the same code works fine in Excel 2003 to Excel 2010, doesn't work with Excel 2013. This is how to simply reproduce the issue: Have a workbook with 2 worksheets in it, called Sheet1 and Sheet2 let's say, and on Sheet1 2 buttons: On click of Button1 activates Sheet2 worksheet using a Macro1 with 1 line in it: ThisWorkbook.Sheets("Sheet2").Select and I can edit data from it fine. On click of Button2 a UserForm1 pops up and on click of

Dynamically call a macro passing parameters from shape OnAction property

倖福魔咒の 提交于 2019-12-18 08:35:02
问题 Well, my problem is that I have created a VBA Sub that receives an excel Cell reference and 2 text values and a Variant as parameter. Sub CreateButton(oCell, sLabel, sOnClickMacro, oParameters) This Sub succeeds in creating a button over the oCell but I must send a parameter to the Macro what is the best way to achieve that ? If have digged some ways that doesn't worked and also others dirty that dont make me fill confortable With the help given I managed to resolve the problem, I'm putting

Dynamically call a macro passing parameters from shape OnAction property

一世执手 提交于 2019-12-18 08:33:15
问题 Well, my problem is that I have created a VBA Sub that receives an excel Cell reference and 2 text values and a Variant as parameter. Sub CreateButton(oCell, sLabel, sOnClickMacro, oParameters) This Sub succeeds in creating a button over the oCell but I must send a parameter to the Macro what is the best way to achieve that ? If have digged some ways that doesn't worked and also others dirty that dont make me fill confortable With the help given I managed to resolve the problem, I'm putting

why i use Worksheet.UsedRange.Rows.Count got wrong result

让人想犯罪 __ 提交于 2019-12-17 20:34:38
问题 In VB.NET I want to get the used rows so I wrote that: Dim objWorksheet As Excel.Worksheet = workbook.Sheets(2) Dim lastRow = objWorksheet.UsedRange.Rows.Count But I don't know why the lastRow is number little than actual used rows, I searched the stackoverflow and someone suggest write like this: Dim range As Excel.Range = objWorkSheet.UsedRange Dim lastRow = range.Rows.Count I tried and also didn't work, the num returns little than actual used rows is no rules, so I don't know how to deal

Searching column for consecutive values and returning three different values to other cells

别等时光非礼了梦想. 提交于 2019-12-14 03:31:14
问题 I have a series of columns. One contains a time stamp for a data point, the next is the data point, the one following that is a conversion from decimal to binary for that data point, and the remaining columns are that binary string split into each bit. Each column has a title: "No Engine Speed", "Engine Derate", and so on. Here's what I'd like to do, but don't have the skill with VBA/Excel to do. I'm trying to take all that information and put it into something that's more friendly to a

Looping through specific sheets in an excel work book and copying data in different work sheet

 ̄綄美尐妖づ 提交于 2019-12-14 03:22:05
问题 I'm trying to copy information from several specific sheets in a workbook, without copying information from irrelevant sheets, to a single sheet called Merge. The name of the sheets where i want to copy the information from is: Summary, Summary(1)... Summary(n+1). In addition, i want the copied information to be pasted after the last row with information and without deleting the header line. The code i'm using is a mix and match from various answers in different Excel-VBA forums so it's not

Problems changing date format of date as string

99封情书 提交于 2019-12-13 19:30:43
问题 I am currently trying to convert yyyymmdd type of date to a ddmmyyy format. I've tried using DATE function and something like this: =DATE(LEFT(A3;4);MID(A3;5;3);RIGHT(A3;7)) Original date for this function is 20120401 but the formula returns: 16.12.2104 . I've tried using functions YEAR, MONTH and DAY instead of LEFT, MID and RIGHT but that's not the right way. I also tried using DATEVALUE but since Excel probably doesn't recognize yyyymmdd as a date, it gives me a #VALUE! error. I've found a

How do you calculate the Quintile for groups of rows in Excel?

久未见 提交于 2019-12-13 17:12:34
问题 I found a partial answer to this question under How do you calculate the Quintile for every row in Excel?. I would like to derive the same quintile data for each row but I need the quintiles to be based on groups that are determined by a value in another column. 回答1: Use this formula: =MAX(1,ROUNDUP(10*PERCENTRANK($C:$C,$C2,4),0)) Change the value 10 to split into whatever number of groups you need - currently it's making decile groups. Change $C:$C to column with target range of values, and

Extract substring from this string inside Excel cell

久未见 提交于 2019-12-13 08:01:57
问题 I have this Excel cell A2 with the contents USD.EUR[IDEALPRO,CASH,EUR] . I would like to extract the substring EUR from the last part of the string using an Excel formula. The nearest formula I came out with is =RIGHT(A2,4) . However, it returns EUR] . What formula can be used to extract the substring? I am using MS Excel 2013. 回答1: If the string that you are searching is only 3 bytes in length, then your simple formula works. But what if it changes? Try the below, =MID(SUBSTITUTE(F2,",","#"