Excel geniuses?
-
- Posts: 854
- Joined: Mon Mar 16, 2020 7:53 pm
- Has thanked: 143 times
- Been thanked: 497 times
Excel geniuses?
Is it possible to set up excel to automatically populate fields on a macro based worksheet, collect the output, then enter another row of data to the fields and repeat until the data runs out?
I am attempting to find the optimum results from two sets of data and the macro based worksheet runs multiple calcs to get the output I’m after so it would be a ball-ache recreating those calcs over multiple lines of data and the worksheet is password protected so I can’t C&P the formulae into a new document to speed up the process.
I am attempting to find the optimum results from two sets of data and the macro based worksheet runs multiple calcs to get the output I’m after so it would be a ball-ache recreating those calcs over multiple lines of data and the worksheet is password protected so I can’t C&P the formulae into a new document to speed up the process.
-
- Posts: 4441
- Joined: Mon Mar 16, 2020 9:02 pm
- Has thanked: 836 times
- Been thanked: 1238 times
Re: Excel geniuses?
So one workbook controlling another?
This looks like a good starting point but it's not something I've ever had the need to do.
https://stackoverflow.com/questions/349 ... -workbooks
This looks like a good starting point but it's not something I've ever had the need to do.
https://stackoverflow.com/questions/349 ... -workbooks
- Rockburner
- Posts: 4376
- Joined: Sun Mar 15, 2020 11:06 am
- Location: Hiding in your blind spot
- Has thanked: 7817 times
- Been thanked: 2527 times
-
- Posts: 13938
- Joined: Mon Mar 16, 2020 7:57 pm
- Location: Milton Keynes
- Has thanked: 2551 times
- Been thanked: 6244 times
Re: Excel geniuses?
This is 100% possible, I had a workbook that did exactly this at my old job....
...which i didn't create. Was done by a graduate nerd using vba.
Sorry.
...which i didn't create. Was done by a graduate nerd using vba.
Sorry.
-
- Posts: 755
- Joined: Mon May 25, 2020 8:35 am
- Location: Malta
- Has thanked: 310 times
- Been thanked: 568 times
Re: Excel geniuses?
What you're describing isn't a macro, but a power query.
Power query is a very powerful way to collect and collate data. If you're willing to get into the rabbit hole, you'll soon be importing the data to a data model rather than a sheet so it will handle over the excel limit of 1m rows, and do calculations in a flash.
Power query is a very powerful way to collect and collate data. If you're willing to get into the rabbit hole, you'll soon be importing the data to a data model rather than a sheet so it will handle over the excel limit of 1m rows, and do calculations in a flash.
-
- Posts: 755
- Joined: Mon May 25, 2020 8:35 am
- Location: Malta
- Has thanked: 310 times
- Been thanked: 568 times
Re: Excel geniuses?
Also: unless the password is an honesty-bix thing and you'll be in trouble for removing it... You can remove it.
Save the file as compatible with excel 97, then Google search VBA password breakers. Mostly they will tie up your computer for ages and not work, unless you know to save the file in compatibility mode first.
Save the file as compatible with excel 97, then Google search VBA password breakers. Mostly they will tie up your computer for ages and not work, unless you know to save the file in compatibility mode first.
-
- Posts: 4441
- Joined: Mon Mar 16, 2020 9:02 pm
- Has thanked: 836 times
- Been thanked: 1238 times
Re: Excel geniuses?
Power query won't feed parameters into Excel, trigger a macro, collect the results and move on to the next parameter.
Power query is great at some things but it's rubbish at iterative processes and probably needs coding with R or Python to do this, an adaptable VBA method would be much simpler.
Power query is great at some things but it's rubbish at iterative processes and probably needs coding with R or Python to do this, an adaptable VBA method would be much simpler.
-
- Posts: 854
- Joined: Mon Mar 16, 2020 7:53 pm
- Has thanked: 143 times
- Been thanked: 497 times
Re: Excel geniuses?
Thanks all, the opportunity has passed as I got a minion (small yellow chap with one eye, squeaky voice) to crunch the numbers multiple times to get as close as possible to the desired outcome. Then the clients decided they just wanted to split the investment 50:50 as I originally suggested although this was after we found an optimum solution *
* excel workbook calculated the tax payable, based on an individual’s circumstances, on surrender of a particular type of investment.
* excel workbook calculated the tax payable, based on an individual’s circumstances, on surrender of a particular type of investment.
-
- Posts: 755
- Joined: Mon May 25, 2020 8:35 am
- Location: Malta
- Has thanked: 310 times
- Been thanked: 568 times
Re: Excel geniuses?
I'd have to see the inputs and outputs, but probably it could swallow the whole process in a handful of conditional columns without going to the trouble of macros. Maybe.Mussels wrote: ↑Mon Jun 27, 2022 9:35 pm Power query won't feed parameters into Excel, trigger a macro, collect the results and move on to the next parameter.
Power query is great at some things but it's rubbish at iterative processes and probably needs coding with R or Python to do this, an adaptable VBA method would be much simpler.