I currently have a Listbox, which gets populated by different comboboxes and textboxes (amount + other info).
When saving the userform, I'd like write to excel cells.
The values that need to get written to certain cells, depends on the input. Users can modify or delete lines in the listbox, so I only want to check and write when the document gets saved.
Column 3 of each line gets a certain number (81,82,83) assigned, depends on the input.
I'm looking for a way to add up the amounts per number and write this to different cells in my spreadsheet.
Example:
Purchase of books €300 81
Water €5.5 81
Rent €799 82
So totals should be €305.5 for '81' and €799 for '82
Is there a generic line of code to collect values from different listbox lines?
I'm not looking for a pre-made code, just some hints to show me the way .
Many thanks in advance!
Bookmarks