[Solved] Set ‘Fit All Columns on One Page’ via Excel JavaScript API

The Office 365 Online Automate Scripts helped get me on the right path. Docs: https://learn.microsoft.com/en-us/javascript/api/excel/excel.pagelayoutzoomoptions?view=excel-js-preview https://learn.microsoft.com/en-us/javascript/api/excel/excel.pagelayout?view=excel-js-preview#excel-excel-pagelayout-zoom-member Code: await Excel.run(async (context) => { var ws = context.workbook.worksheets.getActiveWorksheet(); var PageLayoutZoomOptions_Obj = { ‘horizontalFitToPages’: 1, ‘verticalFitToPages’: 0, } ws.pageLayout.zoom = PageLayoutZoomOptions_Obj await context.sync(); }); Note: I had issues using/including scale so I just left it out. solved Set … Read more

[Solved] Excel cells matching in VBA [closed]

You can accomplish this with a VLOOKUP between two books. The guts of the equation are below. You wont actually type in the ‘[book2]SheetName’ portion, this will need to reflect the name of your other workbook and the sheet that you are looking at within that book. A2 = Look up value (in your example … Read more

[Solved] How to create a combination generator where order does not matter but being limited from a specific range of Sum? Using Excel VBA macro [closed]

How to create a combination generator where order does not matter but being limited from a specific range of Sum? Using Excel VBA macro [closed] solved How to create a combination generator where order does not matter but being limited from a specific range of Sum? Using Excel VBA macro [closed]

[Solved] how to calculate XIRR dynamically in excel and in google sheets

Assuming your table is in A1:G8 (with headers in row 1), and that your Fund of choice, e.g. “B”, is in J2, array formula**: =XIRR(INDEX(F:G,N(IF(1,MODE.MULT(IF(B$2:B$8=J2,{1,1}*ROW(B$2:B$8))))),N(IF(1,{1,2}))),CHOOSE({1,2},INDEX(A:A,N(IF(1,MODE.MULT(IF(B$2:B$8=J2,{1,1}*ROW(B$2:B$8)))))),TODAY())) Copy down to give similar results for Funds in J3, J4, etc. I tend to prefer this to set-ups involving OFFSET; not only is it briefer (and therefore more efficient), … Read more

[Solved] Transpose Column into Row with VBA [closed]

This is not so straightforward a problem because of having to consolidate the information by date. You also do not indicate what you want to happen should there be more than one identical code associated with a particular date. I chose to ignore it, and only list the unique codes, but you can modify the … Read more

[Solved] Breaking down sums into frequency (for histogram)

This should do the trick. If not, it will at least get you started. Sub Expand_Occurance() Dim ItemCounter As Long, shBottom As Long, NewItemRow As Long, OccuranceCounter As Long Dim sh As Worksheet Set sh = ActiveSheet shBottom = sh.Cells(Rows.Count, 1).End(xlUp).Row ‘get the bottom row of column 1 NewItemRow = shBottom + 1 ‘and the … Read more

[Solved] Vlookup all the values matching the search term instead of just one.

With Google Sheets use Query: =QUERY(A:A,”select A where A contains “”” & B3 &””””) Since you have the Excel tag use this formula for excel: =IFERROR(INDEX(A:A,AGGREGATE(15,6,ROW($A$2:INDEX(A:A,MATCH(“ZZZ”,A:A)))/(ISNUMBER(SEARCH($B$3,$A$2:INDEX(A:A,MATCH(“ZZZ”,A:A))))),ROW(1:1))),””) Copy/drag it down sufficient for your needs. 5 solved Vlookup all the values matching the search term instead of just one.