excel-2010

Display all matching values in one comma separated cell

北战南征 提交于 2021-02-18 15:42:10
问题 I have two columns of data in an Excel 2010 spreadsheet. In Column A is a category, and in Column B is a value. There will be multiple values in Column B for each unique category in Column A. What I want to achieve in a separate sheet is to display all of the values for each each unique category in one comma (or semi-colon etc) separated cell. For example, if my first sheet looks like this: ---------------------- | Category | Value | ---------------------- | Cat1 | Val A | | Cat1 | Val B | |

Use Variable in multiple subs VBA

一世执手 提交于 2021-02-17 04:51:15
问题 So I'm using excel 2010, and right now, I'm trying to use calculate the value of a variable in one sub, and want it to be used in multiple subs, except I can't figure out how to do this. Here is an example of what I'm using in its most basic form Public Sub Calc() Dim i As Integer i = 10 - 5 End Sub 'Other sub that will use the value for i calculated in the Calc sub Sub Macro() y = i +5 End Sub How am I suppose to be able to use/pass this value for "i" in/into the sub macro? 回答1: Move the Dim

Extracting digits from a cell with varying char length

谁说我不能喝 提交于 2021-02-16 20:06:50
问题 I have a group of cells, the first of the string never changes, it is and always will (until the coder changes it) 20 characters (inc spaces). I then want to extract the 3 numbers (and in some cases 2) from the remaining sequence. The monthly cost is 2 silver, 1 copper and 40 iron. The monthly cost is 1 silver, 94 copper and 40 iron. The monthly cost is 1 silver and 75 copper. The monthly cost is 8 silver and 40 copper. The monthly cost is 1 silver. The monthly cost is 99 silver, 99 copper

Extracting digits from a cell with varying char length

时光总嘲笑我的痴心妄想 提交于 2021-02-16 20:06:35
问题 I have a group of cells, the first of the string never changes, it is and always will (until the coder changes it) 20 characters (inc spaces). I then want to extract the 3 numbers (and in some cases 2) from the remaining sequence. The monthly cost is 2 silver, 1 copper and 40 iron. The monthly cost is 1 silver, 94 copper and 40 iron. The monthly cost is 1 silver and 75 copper. The monthly cost is 8 silver and 40 copper. The monthly cost is 1 silver. The monthly cost is 99 silver, 99 copper

Making an XLL that runs under 32 and 64-bit Excel

六月ゝ 毕业季﹏ 提交于 2021-02-10 22:52:44
问题 We are using XLDNA to make a small VB.net XLL that loads our data files and places the contents in Excel for editing. When we tried to deploy this among our three-person team, it was like an episode of the Three Stooges - it would work fine on one machine but then tell us that it was not a valid XLL on another, causing much head-smacking. We realized with was 32/64 related, but also found that the machines in question randomly had the 32 or 64 version of Excel even though they are all the

Making an XLL that runs under 32 and 64-bit Excel

半世苍凉 提交于 2021-02-10 22:52:27
问题 We are using XLDNA to make a small VB.net XLL that loads our data files and places the contents in Excel for editing. When we tried to deploy this among our three-person team, it was like an episode of the Three Stooges - it would work fine on one machine but then tell us that it was not a valid XLL on another, causing much head-smacking. We realized with was 32/64 related, but also found that the machines in question randomly had the 32 or 64 version of Excel even though they are all the

Excel Subtracting time

巧了我就是萌 提交于 2021-02-10 14:17:53
问题 Currently trying to setup a formula that will calculate the hours/minutes between two different hours of time. I currently use the following formula in Cell D3 and receive 12:35am as the answer: =C3-B3 What I would want it to display is 35 minutes, which is the correct amount of time in between (6:42AM and 7:17AM). 回答1: Something like this would work: =TEXT(C3-B3,"[m]") or if you want "minutes" written after =TEXT(C3-B3,"[m] ""minutes""") Examples: 回答2: C3-B3 and formatted as [m] will work -

Excel Subtracting time

老子叫甜甜 提交于 2021-02-10 14:15:35
问题 Currently trying to setup a formula that will calculate the hours/minutes between two different hours of time. I currently use the following formula in Cell D3 and receive 12:35am as the answer: =C3-B3 What I would want it to display is 35 minutes, which is the correct amount of time in between (6:42AM and 7:17AM). 回答1: Something like this would work: =TEXT(C3-B3,"[m]") or if you want "minutes" written after =TEXT(C3-B3,"[m] ""minutes""") Examples: 回答2: C3-B3 and formatted as [m] will work -

Extract Pivot Table Row Label (not value)

大兔子大兔子 提交于 2021-02-10 06:48:23
问题 In Excel 2010, I have a pivot table, in compact form, with 3 Row Labels (that represent a management hierarchy). Which of the 3 management levels is displayed in a particular row will change from day to day. (The source data is on another spreadsheet with the fields Manager L3, Manager L2 and Manager L1 in columns with John Smith, Gary Glen and Bob Stevens under them, respectively.) In the column next to the pivot table, I need to capture which row label is being shown. Pivot Table example Is

Excel VBA: Long Execution Time

不打扰是莪最后的温柔 提交于 2021-02-08 10:12:03
问题 I've created a VBA code to delete extra rows and columns that were needed for initial calculations but are required to be removed before converting/importing a csv into a database. The code loops through 21 sheets and runs for about 4 minutes. Is this a decent run time or can it be shortened? ~Thanks Public Sub Test() Dim xWs As Worksheet Set xWs = ActiveSheet Dim Firstrow As Long Dim Lastrow As Long Dim Lrow As Long Dim CalcMode As Long Dim ViewMode As Long 'SETTING DEPENDENT VALUES TO