excel

Rank & Rank.EQ function - Array reference error

混江龙づ霸主 提交于 2021-02-11 13:57:30
问题 Background: Short question on the use of array references within RANK or RANK.EQ function. Both function got the following parameters: ....(number,ref,[order]) Ms.Documentation about the Ref parameter within RANK and RANK.EQ : " Ref Required. An array of, or a reference to, a list of numbers. Nonnumeric values in ref are ignored." Also, other websites I would normally highly recommend, would state that the use of an array or list is possible within the Ref parameter. Sample data: | Rank1 |

Convert Multiline Excel Data into column and rows using Python

…衆ロ難τιáo~ 提交于 2021-02-11 13:54:30
问题 I am looking to reshape the data from an excel sheet using Python. This is how my data looks AuditDate Fields ModifiedBy 1/1/2019 7:58 Status: Assigned (0) Site Group: XXX Region: xxx Site: xxxxx Summary: xxxx Location Company: xxx Support Organization: XXXX Support Group Name: xxxxx Last Name: xxxx First Name: xxxx Categorization Tier 1: Categorization Tier 2: Categorization Tier 3: Company: xxxx Priority: xxx Work Order Type: xxx Company3: xxxxx Request Manager: Product Cat Tier 1(2):

Input 12:00 PM on VBA Userform Combobox

与世无争的帅哥 提交于 2021-02-11 13:53:59
问题 I have this vba userform combobox that shows time range. In the rowsource, i have inputted 12:00 PM. But everytime i click 12:00 PM in the combobox, it shows 12:05 AM instead. Any idea how to solve this problem? 回答1: Use click event instead of change event Private Sub ComboBox5_Click() Dim t As Double With ComboBox5 t = Val(.List(.ListIndex)) .Value = Format(t, "hh:mm:ss AM/PM") End With End Sub 回答2: A ComboBox handles text strings. Excel records time as a fraction of 1. 12:00 PM = 0.5 (half

Duplicate as Value only last row into adjacent column Excel

无人久伴 提交于 2021-02-11 13:50:30
问题 I'm creating a VBA application with some forms. When the data is inserted into the Table, Column A calculates a value with a formula. After that I need to copy the resulting value (like paste special, values only) into the adjacent Row I just need to know how to select the last row everytime. I have tried with ActiveCell , Find , Range etc. but none are working Selection.Copy ActiveCell.Offset(0, 1).Select Selection.PasteSpecial Paste:=xlPasteValues 回答1: Try this: Selection.Copy ActiveSheet

what is wrong with this line of vba code for Excel Print

人走茶凉 提交于 2021-02-11 13:49:32
问题 I have a combobox with list of page size in excel. i want to change page sizes with combobox selection change. Following is not working Public Sub UpdateSize() Dim Papersizetext As String Papersizetext = "xlPaper" & Worksheets("Static").Range("B7").value 'A4 is the value in cell B7 shgenerate.PageSetup.PaperSize = Papersizetext 'not working shgenerate.PageSetup.PaperSize = "xlPaper" & Combobox1.value 'this also not working shgenerate.PageSetup.PaperSize = xlPaperA4 'is working - i want above

Automatically Set Chart Series Colors to Match Source Cell Colors by Category not Series

女生的网名这么多〃 提交于 2021-02-11 13:49:23
问题 I have a VBA code to automatically change the color in a chart, which I found from this site: http://datapigtechnologies.com/blog/index.php/automatically-set-chart-series-colors-to-match-source-cell-colors/ The code is posted below. My problem is that I need this code to apply to the chart's horizontal categories instead of the series because I am using a horizontal bar chart and the data has to be arranged in this way. How can I change the VBA to apply the automatic color change to the

How to concatenate more than one column at the same time in excel using VBA

五迷三道 提交于 2021-02-11 13:48:57
问题 I know how to concatenate when we're dealing with only one column. Example : Number Color 1 blue 1 red 1 pink 2 yelow 2 blue 3 red result : Number Color 1 blue, red, pink 2 Yellow, blue 3 red This is the code i'm using and it works : Sub ConcatenateCellsIfSameValues() Dim xCol As New Collection Dim xSrc As Variant Dim xRes() As Variant Dim I As Long Dim J As Long Dim xRg As Range xSrc = Range("A1", Cells(Rows.Count, "A").End(xlUp)).Resize(, 2) Set xRg = Range("D1") On Error Resume Next For I

VBA Excel replace Word text with Excel cell value

时间秒杀一切 提交于 2021-02-11 13:48:25
问题 Good morning, I would like to replace the address in Word using the one, placed in the Excel cell. My situation looks like in the image below: I have got an address in Excel and I want to paste in in the Word bracket, based inside the table cell. There are some solutions: Write to Word Document from Excel VBA Pasting a String from excel to Word using word-VBA VBA from Word to Excel VBA macros: Excel to Word text replacement which differs from my situation. My code so far looks like this: Sub

Error handling with VBA compiling?

China☆狼群 提交于 2021-02-11 13:41:22
问题 How easy would it be for someone with only decent programming experience to add error handling for compiling? I have an Excel-VBA program that on some computers fails to locate the references, so I made a common folder and placed the .dll files there. Is there a way I can automate this error handling process? It is a compile error for "cannot find library" so I imagine I cannot do this with VBA. Is this easily doable? Thoughts? I did not attach code because there is nothing relevant to show.

How to Protect a sheet but still interact with PivotCharts and Slicers

[亡魂溺海] 提交于 2021-02-11 13:40:55
问题 So I created a sheet of PivotCharts (PivotTables are on another hidden sheet) and want to protect it so that the charts and their layout cannot be affected, however I wish to retain the ability to use their filters and slicers. After some research, the advice seems to be the same since 2013 i.e. Right click PivotChart and/or slicer , select Size and Properties Under Format options open the Properties collapsed menu uncheck Locked Go to Review tab and open the Protect Sheet window Make sure