excel-2016

VBA to create new sheet with file name using save dialogue box and save as CSV format

a 夏天 提交于 2019-12-12 03:44:46
问题 My requirement is that I am having a sheet with some data and a button which has to perform below said task. Task is that once button is clicked it has to ask for file name and location to be save to the new sheet in csv format and the data in the active sheet has to be copied and pasted in a new sheet and name of new sheet should be the name given for file to save in CSV format. Can anyone please help on this? 回答1: This should do the trick, edit to taste. Save the macro to a new module, then

Proper syntax Match and If not isblank

时光怂恿深爱的人放手 提交于 2019-12-12 03:38:05
问题 I need to replace the data the agt_amt from the Billing worksheet with the value in the Adding of the BalanceSheet.Difference to the Billing.Agt_Amt when the Validated Adj = Y. I have been playing with the Match and if not isblank formula but need some assistance with the proper syntax. Restating problem I need to check if the value has been validated hence the Validate=Y, Then Adjust the value of the Billing.agt_amt by the value of the qryDifference.Differernce. Say for Craig W his agent amt

VBA Change Data Labels on a Stacked Column chart from 'Value' to 'Series name'

邮差的信 提交于 2019-12-12 03:36:38
问题 I would like to change the data labels on a stacked column chart from 'value' to 'series name'. The chart I want to edit: I have searched the best I could on the internet and the only way I think this can be done is by using VBA. I am still a VBA noob so any help would be appreciated 回答1: Going into Excel, I select the chart I want to edit and then select all labels by going to Chart Tools > Add Chart Element > Data Labels > More Data Label Options Next I uncheck whatever options I don't want

Sort Excel table (ListObject) on protected sheet using Excel Interop

眉间皱痕 提交于 2019-12-12 03:06:37
问题 Sorting Excel tables (ListObjects) is not allowed on protected sheets. You'll see the following error message: I spent weeks looking for a solution with no success. Everything out there is outdated with Excel 2007 code samples. There are no tutorials or guides on how circumvent this limitation. Here's how I was able to finally overcome.. 回答1: There is no trappable event when sorting from the Excel's filter drop-down menu of a table. You can, however, trap the events when an ascending,

Dir() in Excel for Mac 2016 causes crash

本秂侑毒 提交于 2019-12-11 17:18:40
问题 I am trying to iterate through files using Dir, and I understand that it works differently on Mac than windows. This question has been helpful, but I have been unable to implement the solution suggested. The first call to Dir successfully returns a desired filename, but the second call crashes excel. I would like to implement a pattern like this: Sub printFileNames() Dim path as String Dim fileName as String path = ThisWorkbook.Path & "/SUBFOLDER/" fileName = Dir(path, MacID("XLSX")) While

Re-arrange Axis of MS Excel 2016 Scatterplot

倾然丶 夕夏残阳落幕 提交于 2019-12-11 17:16:02
问题 Software: MS Excel 2016 Files: GitHub Repository Referring Question: MS Excel Scatterplot converts Months to Numbers I created scatterplot in month_unordered_axis.xlsx from following data Then I customized X-axis so it displays only month Unfortunately the scatterplot (in Chart1 of month_unordered_axis.xlsx) starts with October rather than January. How to order the X-axis so it displays from January to December? 回答1: Your graph is displaying October as the minimum value from its automatic

Expression.Error: The name 'Text.BeforeDelimiter' wasn't recognized. Excel 2016

两盒软妹~` 提交于 2019-12-11 16:05:04
问题 I have an excel "Add Column" from Power Query editor. My data looks like this, 26567-5698 51254-5458 6954-1545 45415 56541 5621 .. Some have 4 digits before - and some have 5 digits before - . For those values that have - in between, I like to extract the first part (before delimiter). I tried the following, if Text.Length(Text.BeforeDelimiter([MyCol], "-")) = 4 then "0" & Text.Start([MyCol],4) else if Text.Length(Text.BeforeDelimiter([MyCol], "-")) = 5 then Text.Start([MyCol],5) else [MyCol]

Excel conditional colour scale for multiple rows

做~自己de王妃 提交于 2019-12-11 08:43:15
问题 I have a spreadsheet that shows stock data for a range of products. I have a column for each day and the values show how my stock levels will decrease over time. I want to use colour scale to make it easy to see when the stock of certain products will be running low. The minimum, mid and maximum points of my scale are based on a value in a different column and that value is different for each product. Depending on whether it's the midpoint or the maxpoint, it gets multiplied. Unfortunately,

Subtotal average, of data linked to a particular month in Excel 2016

≡放荡痞女 提交于 2019-12-11 06:58:42
问题 I have a large spreadsheet and I am struggling to get an average, no formula I have used thus far from google or otherwise, has worked. The average is an average of time, in particular, hours between a start and end time, converted into days. In column E9:E1833, I have start time as dd/mm/yyy hh:mm In column J9:J1833, I have the time in days, from start to finish as [h]:mm (some are empty) I have an auto filter setup to change with job type / area / status etc, and the result needs to change

How do I keep Cell Referencing in Excel if I replace sheet?

亡梦爱人 提交于 2019-12-11 06:07:22
问题 I have a sheet with a bunch of data. I then have a different sheet that references multiple cells in that first sheet. If I want to delete the first sheet and replace it with an identical sheet (identical in every sense, ie sheet name, data type in each cell, format, etc, except for the actual text data in each cell), the references in the other sheet are lost, and all my cells produce a #REF! error. Is there any way of preserving the references and replacing or overwriting the sheet, without