Need help with VBA codes

%3CLINGO-SUB%20id%3D%22lingo-sub-2771512%22%20slang%3D%22en-US%22%3ENeed%20help%20with%20VBA%20codes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2771512%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%20I%20need%20help%20with%20a%20workbook.%20Each%20month%20I%20want%20to%20click%20a%20button%20to%20start%20a%20new%20month%20-%20by%20starting%20a%20new%20month%20I%20want%20all%20figures%20listed%20in%20the%20column%20named%2C%20%22current%20disbursement%22%20to%20be%20moved%20into%20the%20%22previous%20fundings%22%20column.%20I%20will%20enter%20my%20new%20current%20numbers%20manually.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWith%20the%20next%20month%2C%20how%20do%20I%20add%20what%20was%20already%20listed%20in%20previous%20fundings%20to%20what%20needs%20to%20be%20moved%20over%20from%20current%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20soon%20as%20I%20zero%20out%20the%20current%20column%2C%20my%20previous%20fundings%20column%20takes%20its%20cue%20and%20zero's%20itself%20out%20as%20well.%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20I%20manually%20enter%20the%20number%20into%20the%20previous%20fundings%20column%2C%20excel%20won't%20know%20that%20next%20time%20I%20want%20to%20add%20it%20to%20something%20else.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20in%20advance%20for%20any%20suggestions!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2771512%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2771659%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20help%20with%20VBA%20codes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2771659%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1162525%22%20target%3D%22_blank%22%3E%40Devon500%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOh%2C%20this%20raises%20so%20many%20questions%20in%20my%20mind.%3C%2FP%3E%3CUL%3E%3CLI%3E%22Where%20are%20all%20the%20numbers%20coming%20from%3F%22%20for%20example.%26nbsp%3B%3C%2FLI%3E%3CLI%3E%22Is%20there%20backup%20detail%20for%20(potentially)%20multiple%20transactions%20underneath%2C%20say%2C%20%22Current%20Disbursement%22%3F%3C%2FLI%3E%3CLI%3E%22What%20happens%20to%20any%20given%20month's%20figures%20after%20they've%20been%20moved%20off%20this%20page%3F%22%20(said%20another%20way%2C%20Is%20any%20history%20kept%3F%20If%20so%2C%20where%3F%20If%20not%2C%20why%20not%3F)%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20could%20go%20on.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20a%20person%20with%20a%20database%20background.%20I%20see%20a%20spreadsheet%20such%20as%20you%20have%20here%20as%20a%20summary%20of%20a%20bunch%20(pretty%20surely%20a%20BIG%20BUNCH)%20of%20other%20transactions.%20Transactions%20the%20details%20of%20which%20you'd%20also%20want%20to%20be%20able--I%20would%20think--to%20report%20on%20or%20supply%20as%20backup%20to%20this%20kind%20of%20monthly%2Fquarterly%20summary.%20Obviously%20(I%20think)%20there%20is%20a%20set%20of%20categories%20off%20to%20the%20left%20that%20have%20intentionally%20been%20removed%20from%20the%20test%20sheet%20you've%20posted%3B%20that's%20fine.....need%20to%20preserve%20confidentiality%2C%20and%20I%20respect%20that...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EA%20database%20could%20be%20used%20as%20the%20background%20to%20this%20as%20a%20%22dashboard%22%20spreadsheet%20that%20retrieves%20the%20data%20on%20all%20those%20transactions%20and%20presents%20a%20snapshot%20for%20any%20given%20month%20%22on%20demand.%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20that%20in%20fact%20what's%20happening%3F%20It%20doesn't%20sound%20like%20it%2C%20given%20both%20your%20questions%20and%20your%20description%20of%20adding%20numbers%20manually%20into%20various%20rows.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20I'm%20asking%20just%20to%20probe%20whether%20or%20not%20there's%20any%20interest%20in%20a%20different%20approach%20altogether.%20If%20not%2C%20that's%20fine.....I%20have%20to%20defer%20to%20others%20anyway%20when%20VBA%20is%20involved%3B%20as%20noted%2C%20my%20perspective%20is%20that%20of%20a%20database%20person.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2771699%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20help%20with%20VBA%20codes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2771699%22%20slang%3D%22en-US%22%3EThere%20is%20definitely%20whole%20bunches%20of%20other%20information%20associated%20with%20each%20line%20of%20the%20spreadsheet.%20This%20is%20intended%20to%20sum%20it%20up%20with%20just%20the%20top%20layer%20of%20information.%20I%20am%20open%20to%20other%20approaches.%20The%20sheet%20I'm%20describing%20was%20used%20at%20a%20previous%20location%20of%20employment%20and%20it%20was%20a%20thing%20of%20beauty.%20Also%20password%20protected%20so%20I%20am%20trying%20to%20recreate%20it.%20The%20goal%20is%20to%20have%20a%20saved%20file%20for%20each%20month%20showing%20exactly%20what%20we%20asked%20for%20reimbursements%20on%20that%20month%20and%20which%20funding%20source%20was%20allowed%20to%20pay%20for%20which%20line%20item.%20With%20recreating%20this%20document%2C%20I%20am%20hoping%20to%20avoid%20user%20error%20in%20that%20we%20now%20need%20to%20manually%20add%20the%20figure%20in%20%22current%22%20to%20%22previous%22%20so%20we%20can%20start%20a%20fresh%20sheet%20of%20the%20new%20current%20requests.%20It's%20just%20asking%20for%20problems.%20I%20know%20that%20Excel%20can%20do%20this%20for%20me%20but%20I%20cannot%20figure%20out%20the%20language%20to%20use.%20I%20have%20a%20feeling%20that%20I%20will%20need%20to%20create%20multiple%20macros%20and%20break%20things%20down%20to%20one%20little%20step%20at%20a%20time%20but%20I'm%20stuck%20on%20the%20first%20step!%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Aslightly_smiling_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hello, I need help with a workbook. Each month I want to click a button to start a new month - by starting a new month I want all figures listed in the column named, "current disbursement" to be moved into the "previous fundings" column. I will enter my new current numbers manually.

 

With the next month, how do I add what was already listed in previous fundings to what needs to be moved over from current? 

 

As soon as I zero out the current column, my previous fundings column takes its cue and zero's itself out as well. 

If I manually enter the number into the previous fundings column, excel won't know that next time I want to add it to something else. 

 

Thank you in advance for any suggestions!

4 Replies

@Devon500 

 

Oh, this raises so many questions in my mind.

  • "Where are all the numbers coming from?" for example. 
  • "Is there backup detail for (potentially) multiple transactions underneath, say, "Current Disbursement"?
  • "What happens to any given month's figures after they've been moved off this page?" (said another way, Is any history kept? If so, where? If not, why not?)

 

I could go on.

 

I'm a person with a database background. I see a spreadsheet such as you have here as a summary of a bunch (pretty surely a BIG BUNCH) of other transactions. Transactions the details of which you'd also want to be able--I would think--to report on or supply as backup to this kind of monthly/quarterly summary. Obviously (I think) there is a set of categories off to the left that have intentionally been removed from the test sheet you've posted; that's fine.....need to preserve confidentiality, and I respect that...

 

A database could be used as the background to this as a "dashboard" spreadsheet that retrieves the data on all those transactions and presents a snapshot for any given month "on demand."

 

Is that in fact what's happening? It doesn't sound like it, given both your questions and your description of adding numbers manually into various rows. 

 

So I'm asking just to probe whether or not there's any interest in a different approach altogether. If not, that's fine.....I have to defer to others anyway when VBA is involved; as noted, my perspective is that of a database person.

There is definitely whole bunches of other information associated with each line of the spreadsheet. This is intended to sum it up with just the top layer of information. I am open to other approaches. The sheet I'm describing was used at a previous location of employment and it was a thing of beauty. Also password protected so I am trying to recreate it. The goal is to have a saved file for each month showing exactly what we asked for reimbursements on that month and which funding source was allowed to pay for which line item. With recreating this document, I am hoping to avoid user error in that we now need to manually add the figure in "current" to "previous" so we can start a fresh sheet of the new current requests. It's just asking for problems. I know that Excel can do this for me but I cannot figure out the language to use. I have a feeling that I will need to create multiple macros and break things down to one little step at a time but I'm stuck on the first step!

@Devon500 

 

Well, I'm glad you're open. I'm--long retired--not in the business of consulting on and helping clients create advanced accounting databases and monthly summary reports. I can pretty confidently assure you that you'd be far better served by building a solid database in the background, a database in which you record the individual transactions that constitute the "bunches" of data that lie behind these summary numbers.

 

As a trivial example of the kind of thing I'm talking about, I have a database that consists of every check written, every income item received, every credit card payment (downloaded from the various banks in every case)....I add budget categories to each line of the database...and then use Excel (Pivot Table, generally) to summarize monthly totals for each budget category. I can (through the magic of the Pivot Table) get instant backup details on any monthly figure in any budget category. How many macros are involved in this workbook? Zero. It's all done with standard, built-in Excel functions. Not to say that macros or VBA routines aren't useful; they are when needed. But they're often not needed, and (potentially) less reliable, if only because less tested, than standard built-in routines.

 

So I don't know what your budget is to develop this in a different way, and I'd be happy to give a more detailed description of what I'm hinting at, but I think you and your organization would be well served by taking a step back from the monthly summary itself to design a database as the foundation of a more robust monthly reporting system.

@mathetes We do have a GL system which serves as the larger database for global info - capabilities of sorting on the totals that have been spent on one code or another. This sheet really needs to represent only the current request and the summary totals of previous requests. The secondary piece would purely be there so everyone can see we didn't spend more than the agreed upon amount per line item - or to prove that we do have a few dollars left for that line item. Thank you for your input! I will definitely continue brainstorming on how to make this even better