excel-2010

De-Stacking columns in Excel using VBA

大兔子大兔子 提交于 2019-12-13 19:53:09
问题 I have a dataset in three columns composed of a repeating set of UUIDs in the first column, string responses for each UUID in the second, and a code for each response in the third. I need to break this out into multiple sets of columns, one for each repeating set of UUIDs. See the below illustration: I Have: UUID RESPONSE Resp. Code id1 String1 Code1 id2 String2 Code7 id3 String3 Code3 id1 String4 Code3 id2 String5 Code5 id3 String6 Code1 I need: UUID RESPONSE Resp. Code RESPONSE Resp. Code

Edit Outlook email from Excel VBA

喜你入骨 提交于 2019-12-13 19:43:05
问题 I've got the below code to successfully use a pre-made Outlook template that is saved locally on my machine (fileName) and attach the Active Excel document into it, however there is some additional text that I'd like to add to the email template to save me the time to copy and paste it over. Is there anyway to add ADDITIONAL body text to the pre-made email template or if I can have my VBA code read the body text and then I can add to it by storing it in a temporary variable? It's a saved .msg

Delete the string after the delimiter in excel

一世执手 提交于 2019-12-13 19:41:36
问题 I have simple problem. I was analyzing some data and came up with this problem. Below is my value in a colomn: www.mysite.come/api/Customer?id=12333&name=jack www.mysite.come/api/Department?id=52365&name=COP www.mysite.come/api/Customer?id=13333&name=mathew etc I want to filter this data something like this www.mysite.come/api/Customer www.mysite.come/api/Department www.mysite.come/api/Customer Please help me with this. 回答1: If its just as simple as removing everything after, including, the ?

Run time error 1004 when trying to sort data on three different values

£可爱£侵袭症+ 提交于 2019-12-13 17:42:27
问题 I've read at least fifteen different articles on this and tried a number of different possible solutions. I am trying to use the VBA code below to sort a worksheet of variable size by three different levels. When I step through the code I get an error 1004 at the .apply argument of the sort. Run-time error '1004': The sort reference is not vald. Make sure that it's within the data you want to sort, and the first Sort By box isn't the same or blank. Can anyone suggest a reason why or a

Excel PivotField Orientation is wrong?

南楼画角 提交于 2019-12-13 16:44:58
问题 I'm using Excel 2010 and writing a VBA function to automatically format various metrics in a pivot table as it is changed by the user (so that formatting is preserved when they add/remove fields). I'm looping through the PivotFields collection to do this. In order to change the format the PivotField needs to be visible in the pivot table, otherwise it throws an error. So I figured I could just check the Orientation property of the PivotField and only handle those set to an Orientation of

How can I open a workbook, copy data, and add to last line on another workbook? [closed]

空扰寡人 提交于 2019-12-13 16:34:10
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 months ago . Is it possible to open another workbook from the current one and copy the data on the table columns and paste on the last line of the table in the current workbook? And also delete the source data. 回答1: Adapt the 5th vars and try this code : Option Explicit Sub test() Application

Subscript out of range error (Error 9): .FormatConditions

ⅰ亾dé卋堺 提交于 2019-12-13 15:21:58
问题 My code sometimes throws up an Error 9, Subscript out of range error. Amongst many other things, my code takes a load of cells and removes existing conditional formatting to them and then re-applies it adding in i number of conditions dependent on the number of items that have just been added to a range. Function FormatLevelX() Dim i As Integer Dim j As Integer Dim k As Integer Dim r As Integer Dim sLevelRangeName As String For j = 1 To Sheets("LEVEL").Range("MajorLevels").Columns.Count

Linking worksheets to a master worksheet and keeping values if the master worksheet is not present? Excel 2010

☆樱花仙子☆ 提交于 2019-12-13 13:26:43
问题 I have many worksheets and at present, every 3 months I have to go through these one by one to update information in just a few cells. It would be great if I could create a master source file containing these few cells that get updated, that all my worksheets linked to, so that I could just update this file and all my files would then update. The only trouble I have is that I then send these worksheets out to clients by email, each client gets a specific worksheet. This would mean that the

Excel VBA printer API, set colour and duplex

江枫思渺然 提交于 2019-12-13 12:12:54
问题 here's my problem. I am trying to access the printer and change the colour and duplex settings. So far the code I have allows me to change the user preferences of the networked printer. But I have the following two problems below. 1) The codes set's the printer to either simplex or duplex as intended, however is does not set the colour preference correctly! 2) Excel is not automatically picking up the new settings, I still have to go in and manually click the reset button for the new changes

Using VBA to save a file in excel 2010 with a different name each time [closed]

烈酒焚心 提交于 2019-12-13 11:15:42
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I have a spreadsheet that I'm using as a template to get user input. When you press the submit button on the spreadsheet, it sends the data to a different workbook that stores all the previous entries and then clears the template. Is there a way to save the template as a different file when you push the button?