excel-2016

Workbooks.OpenText not parsing csv files properly Excel 2016

二次信任 提交于 2019-12-25 06:08:29
问题 I'm pretty sure this worked properly in previous versions of Excel Test File: d/mm/yyyy hh:mm:ss 5/12/1999 6:01:12 30/11/2001 5:00:00 And the delimiter between the date and the time is a Space (ASCII code 32) If the file is saved as a .txt file, the OpenText method parses properly. If the file is saved as a .csv file, the OpenText method doesn't seem to work at all If the spaces are replaced with commas, and the file is saved as a .csv file, the OpenText method will split the lines into two

How to remove duplicates that are case SENSITIVE in Excel (for 100k records or more)?

久未见 提交于 2019-12-25 05:23:22
问题 I have tried using this formula field and copying to all >100k records I have. =IF(SUMPRODUCT(--EXACT(A2,$B$1:B1)),"",A2) where: column A = column with all data including duplicates column B = column to display data (from column A) if unique otherwise empty string However I hit this issue: Yes my Excel 2016 is 32bit and yes my laptop is only 8GB RAM. But I have read up that people with 64bit and 16GB RAM experienced the same error as me. I know there is a function in Excel function : Data >

EXCEL How to change the REST URL based on the cell parameters

会有一股神秘感。 提交于 2019-12-25 01:08:02
问题 I created a web query as below in Excel. New Queries --> From Other Sources --> From Web How do I pass in the cell value as a parameter to the Url? I have search bunch of articles, including in the stackoverflow. None of them work. There is 1 article says I can do this in VBA. ThisWorkbook.Sheets("[SheetName]").QueryTables("[TableName]").Connection = But it is not there. Any one know how to do this? More information: It is connecting to a REST server, and geting back the JSON result. I found

Microsoft.Office.Interop.Excel.Application - Invokeing Different Versions of Excel

非 Y 不嫁゛ 提交于 2019-12-24 10:55:53
问题 I have the following issue: var oExcelApp = new Microsoft.Office.Interop.Excel.Application(); On this machine this starts Excel 2016, however I have both Excel 2010 and Excel 2016 installed on my machine. I'd like to start 2010 instead, and I'd like to keep both 2010 and 2016 installed on my machine when I do that. According to this post, it's not possible. However, my understanding is that you can do this programmatically using the following commands: (To register Excel 2010 as the default

VBA WorksheetFunction.Sum doesn't work with array but works with range?

社会主义新天地 提交于 2019-12-22 17:47:10
问题 I'm not a VBA newbie but I have a newbie problem. I was working on a project and I needed to create a function that takes a certain cell in the spreadsheet, expands the range and then sums it. Function Top_Performers(Sales As Range, DataWindow As Integer) Dim MyArray () As Variant Dim c As Integer, r As Integer r = Sales.Row c = Sales.Column MyArray = Range(Worksheets("Data").Cells(r, c - DataWindow + 1), Worksheets("Data").Cells(r, c)) Top_Performers = Application.WorksheetFunction.Sum

VBA code to filter a pivot table based on the value in a Cell

こ雲淡風輕ζ 提交于 2019-12-20 07:40:34
问题 I’ve searched and tried everything I could find on how to filter a pivot table via VBA code referencing the value of a cell. The table only has one filter and it’s called “name”, this table is part of a score card that I’m putting together and the pivot itself is named “data” the sheet is named “report” and the cell I’m referencing is A5. I’m able to do simple things in VBA and have been using it here and there for a couple of years however this one thing has me pulling my hair out. Could

VBA to open several workbooks, copy specific data, remove duplicate rows and paste the information in a new workbook

回眸只為那壹抹淺笑 提交于 2019-12-20 06:28:27
问题 I know the title is not that clear but I hope I can explain it better in this description. I'm new to VBA and I need to write some code that does the following: . Opens several workbooks in a specific folder and copies information from a table in the middle of the source sheets (only one actives) to a target Sheet1 in a new workbook. Problem 1: the tables have the same number of columns but different number of rows (originally they vary from A42 to L##(?) because users can add or remove rows,

How to make Microsoft Web Browser object work in Excel 2016

空扰寡人 提交于 2019-12-18 06:14:16
问题 When I try to insert it, I constantly get the "Cannot insert object" error. It seems to be a known issue with former Excel versions, but I couldn't find any support for 2016. Has anyone been able to make this work? Here are screenshots: 回答1: This appears to be intentional behaviour from Excel 2013 onwards. From this article: This issue occurs because some scriptable controls are made obsolete in Office 2013 for security reasons. This is by design, and these errors are expected. There is a

How to make Microsoft Web Browser object work in Excel 2016

社会主义新天地 提交于 2019-12-18 06:14:14
问题 When I try to insert it, I constantly get the "Cannot insert object" error. It seems to be a known issue with former Excel versions, but I couldn't find any support for 2016. Has anyone been able to make this work? Here are screenshots: 回答1: This appears to be intentional behaviour from Excel 2013 onwards. From this article: This issue occurs because some scriptable controls are made obsolete in Office 2013 for security reasons. This is by design, and these errors are expected. There is a

How do I use On Error GoTo?

我的未来我决定 提交于 2019-12-14 04:03:38
问题 I'm lead to believe that the vba IDE doesn't allow proper breaking on errors. I asked a question on how to identify runtime errors here: How do I break on errors? The solution / workaround seems to be to use On Error GoTo ErrorHandler or similar. I'm trying to make that work but haven't had much success. According to Microsoft On Error GoTo will send you to the specified code of region when a runtime error occurs (https://msdn.microsoft.com/en-us/library/5hsw66as.aspx). Based on my experience