Is there a dedicated place within RPG SE for users to post source codes or helpful spreadsheets that they made/use to share the love to other users? [migrated]

I play a summoning focused druid in my 3.5e campaign and handling multiple summons and math on the fly with all the augments got tiresome – I couldn’t find a helpful sheet for animal/creature templates, so I decided to try to make one (.NET, C#). It’s a work in progress, but I want to share the source code when/if it’s workable and/or “finished.”

So, rpg friends, is there a dedicated place for this? Where do I look when I want to do some looking, and/or where do I throw my links/sheets when I want to share the love? If I see there’s a preference among the community for prefer sheets instead of source code, I’d shift my work towards getting it into a sheets format.

Screenshot for the idea of the program/progress

enter image description here

Filter b y Date, summarise and paste data between spreadsheets

I have written the below working Code to speed up the summarisation of transaction data into a reduced format whilst also checking and providing feedback where there is no data to transfer.

Overview: I manage the bookkeeping for 40+ companies in an excel workbook. All transactions are added to a central sheet “Amalgamated Data” and from there I need to provide a summary of all outgoing payments only between 2 dates set by the User in an easier to digest format than that provided in the Amalgamated Sheet.

Option Explicit  Sub UpdatePayments()      'This Sub does the following     '   Filter Amalgamated Table by dates defined on Overview Sheet     '       1.  If no transactions within data range tell me     '           a.  Tell me and Exit Sub – no changes made     '       2.  If transactions do exist     '           a.  Copy Payment info only     '           b.  Rearrange Data and reformat     '           c.  Filter to remove incoming payments     '               i.  If no outgoing transactions (ie any remaining rows) tell me and Exit Sub     '           d.  Copy payments to front sheet     '      Dim overviewSheet As Worksheet     Set overviewSheet = Sheets("Overview")      Dim paymentFinalTable As ListObject     Set paymentFinalTable = overviewSheet.ListObjects("TablePayments")      Dim amalgamatedDateSheet As Worksheet     Set amalgamatedDateSheet = Sheets("Amalgamated Data")      Dim sourceTable As ListObject     Set sourceTable = amalgamatedDateSheet.ListObjects("TableFullData")      Dim paymentHelperSheet As Worksheet     Set paymentHelperSheet = Sheets("Payments")      On Error Resume Next 'Unhide Helper Sheet     If paymentHelperSheet.Visible = xlSheetVeryHidden Then paymentHelperSheet.Visible = xlSheetVisible      On Error GoTo 0      Application.ScreenUpdating = False     Application.DisplayAlerts = False      Dim paymentHelperTable As ListObject     Set paymentHelperTable = paymentHelperSheet.ListObjects("TablePaymentsInt")      ' Clear all filter from table      sourceTable.AutoFilter.ShowAllData      'Filter by Date      Dim startDate As Long, endDate As Long     startDate = overviewSheet.Range("J8").Value     endDate = overviewSheet.Range("L8").Value      sourceTable.Range.AutoFilter Field:=4, _                                  Criteria1:=">=" & startDate, _                                  Operator:=xlAnd, _                                  Criteria2:="<=" & endDate      ' Filter by Payment Type      sourceTable.Range.AutoFilter Field:=8, _                                  Criteria1:="Payment"      'If no payments at all ask for next steps      On Error Resume Next     Dim noTransactionsInPeriod As Boolean     noTransactionsInPeriod = sourceTable.AutoFilter.Range.Columns(1).SpecialCells(xlCellTypeVisible).Count <= 1     On Error GoTo 0      If noTransactionsInPeriod Then          Dim Result As Integer          MsgBox "No Transactions within period" & vbCrLf & "from: " & overviewSheet.Range("J8") & vbCrLf & "to: " & overviewSheet.Range("L8"), vbOKOnly          sourceTable.AutoFilter.ShowAllData          paymentHelperSheet.Visible = xlSheetVeryHidden          'Update Screen updating          Application.ScreenUpdating = True         Application.DisplayAlerts = True          MsgBox "Payment information not transferred"          Exit Sub     'If there are outward payments         Else          'Copy Data to intermediate sheet          sourceTable.Range.SpecialCells(xlCellTypeVisible).Copy _         Destination:=paymentHelperSheet.Range("A4")          'Move Columns around          On Error Resume Next         Dim lastTargetRow As Long         lastTargetRow = paymentHelperSheet.Range("B" & Rows.Count).End(xlUp).Row         On Error GoTo 0          paymentHelperTable.AutoFilter.ShowAllData          With paymentHelperSheet             .Columns("D:D").Cut             .Columns("B:B").Insert Shift:=xlToRight             .Columns("G:G").Cut             .Columns("C:C").Insert Shift:=xlToRight             .Columns("R:R").Cut             .Columns("E:E").Insert Shift:=xlToRight             .Columns("D:E").Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove             .Columns("G:G").Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove              .Range("G5").Formula = _                                  "=IF(RIGHT(L5,3)=""O/D"",L5,CONCATENATE(L5,"" - "",K5))"             .Range("G:G").Copy             .Range("G:G").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _                                        :=False, Transpose:=False             .Range("D5").Formula = _                                  "=IF(M5<0,""EUR"",IF(N5<0,""GBP"",IF(O5<0,""USD"","""")))"             .Range("E5").Formula = _                                  "=IF(M5<0,-M5,IF(N5<0,-N5,IF(O5<0,-O5,"""")))"              .Columns("D:E").Copy             .Columns("D:E").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _                                          :=False, Transpose:=False              .Columns("H:X").Delete              'Correct formatting of columns              .Columns("B:B").NumberFormat = "dd/mm/yyyy"             .Columns("C:D").NumberFormat = "General"             .Columns("E:E").Style = "Comma"             .Columns("F:H").NumberFormat = "General"          End With          'Filter all inward payments for deletion          paymentHelperTable.Range.AutoFilter Field:=4, Criteria1:="="          'Check if inward payments          Dim inwardPaymentsPresent As Boolean         On Error Resume Next         inwardPaymentsPresent = paymentHelperTable.AutoFilter.Range.Columns(1).SpecialCells(xlCellTypeVisible).Count >= 1         On Error GoTo 0          If inwardPaymentsPresent Then              'If inward payments, delete rows             paymentHelperTable.DataBodyRange.SpecialCells(xlCellTypeVisible).Delete           End If          paymentHelperTable.AutoFilter.ShowAllData            If paymentHelperSheet.Range("A5") = vbNullString Then              MsgBox "No outgoing payments within period" & vbCrLf & "from: " & overviewSheet.Range("J8") & vbCrLf & "to: " & overviewSheet.Range("L8"), vbOKOnly              'Hide Payment intermediate sheet              sourceTable.AutoFilter.ShowAllData              paymentHelperSheet.Visible = xlSheetVeryHidden              'Update Screen updating              Application.ScreenUpdating = True             Application.DisplayAlerts = True              MsgBox "Payment information not transferred"              Exit Sub         Else              'Clear existing data              If overviewSheet.Range("I11") <> vbNullString Then                  With paymentFinalTable                     .AutoFilter.ShowAllData                     .DataBodyRange.Offset(1, 0).Resize(.DataBodyRange.Rows.Count - 1, .DataBodyRange.Columns.Count).Rows.Delete                     .DataBodyRange.ClearContents                 End With                  'Copy Data             End If              Dim lRow As Long              lRow = overviewSheet.Range("I" & Rows.Count).End(xlUp).Row               paymentHelperTable.DataBodyRange.Copy              With overviewSheet                 .Range("I" & lRow).PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:=xlNone                 Application.CutCopyMode = False             End With          End If      End If      ' Clear all filter from table     sourceTable.AutoFilter.ShowAllData      paymentHelperTable.EntireRow.Delete      'Hide Payment intermediate sheet      paymentHelperSheet.Visible = xlSheetVeryHidden      'Update Screen updating      Application.ScreenUpdating = True     Application.DisplayAlerts = True      'Message successful      MsgBox "Payments Transferred"   End Sub  

It’s currently taking approx 2 mins to execute on a filtered set of generally about 30 rows. Is there any optimisation that can be made to try to speed this up? All help, thoughts and recommendation gratefully received.

Thanks

R

How to run macro-like code on spreadsheets in android?

I have a javascript code in google-scripts for a google sheet. It is basically a database search and report-maker. I had originally written it in VBA with buttons but converted it into Javascript with onEdit triggers.

I’d prefer to have it working offline for 2 reasons:

Google-sheets has limitations on 5 Million cells per workbook. I want to be able to use my code even in the absence of an internet connection from my phone. I’d like some suggestions on how to go about making the code work on Android, perhaps even making an app. Ideally, I’d like to edit the database on a monthly basis and not be limited to a certain number of cells per workbook.

I’m not much of a coder, but I am trying to get this to work so I’d greatly appreciate any help!

Check button in Google Spreadsheets specific for each user

I have a Google Spreadsheet with different tasks. I want to implement a check button in the following way:

My intention is that the users can’t edit the spreadsheet but they have to be able to use the check button at each task. The difficult part is that it is the intention that these check buttons are user specific. So if one user checks or unchecks a button this doesn’t change the check buttons of the other users. Further, it is the intention that when a user closes the spreadsheets and opens it the next day the same buttons have to be checked as when he closed the spreadsheet.

The farthest I got is to make checkboxes that only I as the creator of the spreadsheet can edit. Does anybody have an idea how I could make this or if it is even possible to make?

How can I reference a cell in a custom function while setting up data validation in Google spreadsheets?

I made the following Google script to check whether a string is less than some length:

function isLengthLessThan(length, text) {   return (text.length < length) }; 

How can I set up data validation using this custom formula to check the length of cells? What can I put where the question mark is so that it will represent the value of the cell?

custom formula data validation screen

How can I reference a cell in a custom function while setting up data validation in Google spreadsheets?

I made the following Google script to check whether a string is less than some length:

function isLengthLessThan(length, text) {   return (text.length < length) }; 

How can I set up data validation using this custom formula to check the length of cells? What can I put where the question mark is so that it will represent the value of the cell?

custom formula data validation screen

How to use the SPLIT function in Google Spreadsheets with different delimiters and with some delimiters with multiple characters?

My question is similar to this one: SPLIT function in Google Spreadsheets with OR statement

but has the following difference:

I want to use the delimiter “apple” and the delimiter “.” within the SPLIT function.

Since the delimiter apple has multiple characters, @parkydr answer here doesn’t work.

Example:

On this input on A2:

I ate an apple on the bus home. Going 

I want it to split like this:

I ate an / on the bus home / Going 

I tried this:

=SPLIT(A2,"apple.",TRUE)  I / t   /   n   / on / th   / bus / hom / Going 

and this

=SPLIT(A2,"'apple''.'",TRUE)  I / t   /   n   / on / th   / bus / hom / Going 

and this

=SPLIT(A2,"apple.",false)  I ate an apple on the bus home. Going 

and this

=SPLIT(A2,"apple"".",false) #ERROR Formula parse error. 

and this

=SPLIT(A2,"'apple''.'",false) I ate an apple on the bus home. Going 

How to make return the next split?

I ate an / on the bus home / Going 

Thanks a lot for your help!

How can I set the increment value for Google Spreadsheets to auto-increment?

I have a series of cells referencing other cells:

 | Row |  a  |  b  | col B shows |  |-------------------------------|  |  1  |  1  | =a2 |      2      |  |  2  |  2  | =a4 |      4      |  |  3  |  3  | =a6 |      6      | 

If I select cells b1,b2 & b3, then drag the autofill corner to fill in b4, b5, & b6, the fill pattern follows the increment of the “source” cells, i.e, “+2”, but the autofill seems to start with a value based on the number of cells I’ve selected. It looks like the app takes the value of the first cell in the series (“=a2”, in this case) and increments the autofill value by the number of cells selected in the series (3, here), So rather than auto-filling cell b4 with the next value in the progression (“=a8”), b4 is auto-filled with “=a5”.

 | Row |  a   |  b   | col B shows |  |---------------------------------|  |  1  |  1   | =a2  |      2      |  |  2  |  2   | =a4  |      4      |  |  3  |  3   | =a6  |      6      |  |  4  |  4   | =a5  |      5      |  |  5  |  5   | =a7  |      7      |  |  6  |  6   | =a9  |      9      |  |  7  |  7   | =a8  |      8      |  |  8  |  8   | =a10 |      10     |  |  9  |  9   | =a12 |      12     |  |  10 |  10  | =a11 |      11     | 

If I select 4 cells before dragging to auto-fill, it adds “4” to “a2” and places “=a6” where I would expect it to place “=a10”. Select 5 cells, I get “=a7” where I’d expect “=a12”.

It looks to me like auto-fill is placing the number of values in the series (the series length) above the series increment values. I can see where this would be “by design”, but I want to auto-fill my progression by a set increment, not a set series length.

Hope y’all can help! Please forgive me if I’ve butchered mathematical terminology