excel-2010

PivotCache.Create unable to handle large Range

我是研究僧i 提交于 2019-12-29 01:57:05
问题 This run ok: Dim pc As PivotCache With tgtBook.Sheets("Data") Set pc = tgtBook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:=Range("A1:B5"), Version:=Excel.xlPivotTableVersion14) ' Range("myMthdata")) End With The throws a Run-time error '13' Type mismatch: Dim pc As PivotCache With tgtBook.Sheets("Data") Set pc = tgtBook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:=Range("A1:B500000"), Version:=Excel.xlPivotTableVersion14) ' Range("myMthdata")) End With The only difference

Excel VBA wildcard search

﹥>﹥吖頭↗ 提交于 2019-12-28 07:02:30
问题 I currently have an Excel file with 1 column and many rows. The column holds a first name, last name, and possibly a middle name (EXAMPLE: John Abe Smith). I am writing a macro that has 1 textbox and 1 button. In the excel sheet I have a couple names: Column A -------- John Abe Smith Cindy Troll Bee Randy Row Joe Jumbo Katie Kool Kat I want to write a macro that when I type something in the textbox and click the button, it will look in this column for the name. If it finds it, then just say

Convert Text to Date in Excel Problems

穿精又带淫゛_ 提交于 2019-12-25 18:43:42
问题 So I open excel, in G2 put this: Feb/12/2016 01:09:28 PM UTC Then in any other cell try this formula: =IFERROR(DATEVALUE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(LEFT(G2,11),"Dec",12),"Nov",11),"Oct",10),"Sep",9),"Aug",8),"Jul",7),"Jun",6),"May",5),"Apr",4),"Mar",3),"Feb",2),"Jan",1))+TIMEVALUE(MID(G2,13,11)),"Error") I am trying to get it to show like 2/12/2016 13:09 But its giving me my error. Iv

Match values from two tables in excel

女生的网名这么多〃 提交于 2019-12-25 18:29:06
问题 One table has policy numbers and the agent who wrote each policy. An agent's name multiple times. Another table has just the policy numbers and I want to add the agents' names next to the numbers. VLOOKUP doesn't work because the firs table shows the agents' names multiple times. Any ideas how to do this? 回答1: If the numbers are unique and only the Agents are duplicates, you can use Index/Match or Vlookup. With Index / Match: =IFERROR(INDEX(Policy!$B$2:$B$15,MATCH(A2,Policy!$A$2:$A$15,0)),"")

How can I paste special unformatted plain text into Excel using C# and VSTO?

牧云@^-^@ 提交于 2019-12-25 18:25:31
问题 It's hard to believe this question hasn't been asked or is not possible, but that's what I'm seeing from web searches. All I would like to do is use VSTO to paste only the unformatted plain text into the active cell range. Using Range.PasteSpecial only gives the option to paste values (among others), but these include formatting. Is there really no option to paste unformatted text using PasteSpecial? Is there some other way that anyone has found to do this? Using macros are not an option in

Need assistance in creating an xsd

[亡魂溺海] 提交于 2019-12-25 17:18:46
问题 I'm new to xsd. I'm trying to create a xsd so that my xml should be in the following way.. <Info> <Val name="n_1">A</Val> <Val name="n_2">123</Val> <Val name="n_3">2012-05-05T00:00:00</Val> </Info> The xsd which I created is in this way.. <xs:element name="Info"> <xs:complexType> <xs:sequence> <xs:element name="n_1" type="xs:string"/> <xs:element name="n_2" type="xs:integer"/> <xs:element name="n_3" type="xs:dateTime"/> </xs:sequence> </xs:complexType> </xs:element> This obviously did not

Mapping value if it matches criteria - Excel

守給你的承諾、 提交于 2019-12-25 16:44:09
问题 I have a column( Shopping Cart ) that I am looking to populate. The data that I am looking to populate this cell with has criteria( Grocery List ) that, if met, should equal another criteria via a mapping tool. The information is Maybe an example will better explain, Shopping Cart - Sheet1 Fruit Price Apples 0 Bananas 0 Oranges 0 Grocery List - Sheet2 which changes daily *Grocery List* *Price* Eggs 3.00 Granny Smith .50 Bread 1.00 Mandarin .65 Bacon 2.50 Clementine .60 Red Delicious .70 Here

Why does GetWindowThreadProcessId return 0 when called from w3wp.exe

核能气质少年 提交于 2019-12-25 14:17:12
问题 When running the following code, GetWindowThreadProcessId returns 0. I've read about the same problem happening with a service, but this code is being run as an Application Pool in IIS (namely, w3wp.exe). Also, both w3wp.exe and the EXCEL.EXE it is trying to kill are running in the same session (session 0), and as the same user. if (appClassXls != null) { IntPtr processId = default(IntPtr); GetWindowThreadProcessId(appClassXls.Hwnd, out processId); Process processXls = Process.GetProcessById

How to add option buttons to group in Excel 2010 sheet using VBA?

霸气de小男生 提交于 2019-12-25 14:11:52
问题 I want to add many option button to an excel worksheet (not to a VBA-form) and want to group them by row. The result should look something like this: Here is the code I'm using so far: For d = 1 To 31 Set checkboxKrankCell = Range("H" + Trim(Str(d))) Set checkboxUrlaubCell = Range("I" + Trim(Str(d))) Set checkboxJazCell = Range("J" + Trim(Str(d))) groupWidth = checkboxKrankCell.Width + checkboxUrlaubCell.Width + checkboxJazCell.Width Set groupBoxOptionButtons = ActiveSheet.GroupBoxes.Add

Error handling for if sheets exists when copying rows

自古美人都是妖i 提交于 2019-12-25 12:40:54
问题 following my post If cell value matches a UserForm ComboBox column, then copy to sheet. I have managed to get the code to work to move the check the names and move then to the correct sheets. The problem i am having is checking if the sheets exists. If it finds a match in the sheet and column 2 in the combobox but there is no sheet for the value then it crashes the code. Once all the information has been copied to the relevant sheets, i would like it to display a msgbox telling the user how