I have created a GAMS model that takes parameters from Excel and gives back the results to another Excel file. Now, i want to run my GAMS model from the Excel VBA so that it will become more user-friendly. Is it possible to do.
Any help would be greatly appreciated.
If you go here (https://www.gams.com/31/datalib_ml/libhtml/index.html#datalib) and filter for "vba" you will find a few examples doing exactly this.
Related
Hopefully somebody can guide me in the right direction. I have VBA code that I made that can be ran on multiple Excel spreadsheets. The person I made the code for wants a .exe file with a GUI that can be opened and then you select the excel file you want and it will export a new Excel file that has been modified.
I have not tried anything but research. I understand that this may be beyond VBA for Excel's functionality but if so can somebody guide me in the right direction? Thank you for any help!
So I have never used Excel macros before, and am not experienced in this, but have a (very) rough idea of how things work. I have tried looking up solutions but too inexperienced to convert them to my situation.
I have to import data from many excel files into one main database, and have this going at the click of a button, as there are new files being generated daily.
I can set up the data files to have the values in a consistent format on the first sheet of the file, as a start. From there I am not sure of the coding I need to use to get the data imported to the database file and append it to the bottom of a list.
Any help would be greatly appreciated.
By "one main database" are you referring to an actual database (e.g. SQL Server) or an Excel file. If an excel file, I'd use PowerQuery for this. It's built into Excel 2016, available as a free add-in for Excel 2010/2013, and designed so that non-coders can do incredible data cleaning and prep work from a fairly easy-to-use UI built right into Excel. Plenty of tutorials on the web and youtube, as well as great books such as M is for Data Monkeys by Ken Puls.
Just to reconfirm, I do not need the recorded macro of the solver add-in, however I need the complete vba algorithm. I would be extremely grateful If anyone have any such code (or a link to the code) and share it.
Thanks
Solver is a proprietary product produced by FrontLineSolvers. It is not written in VBA.
See http://www.solver.com/ for details of their products and the names of the algorithms they use.
How can i put some design in excel spreadsheets? like the photo below
I am using VB6 here. Thank you in advance.
You may try this,
Use Record Macro in Excel to record the steps you formatting in Excel. Then open the Macro you recorded in VBA. From there you should find the clues on how to do this in VB6.
I doubt an Excel spreadsheet can handle this but it's worth asking, since I have been trying and searching for a long time with no success.
Entering this into a cell:
=complex(abs(-1.5*(-1.5)^(-1.5))),0)
and the cell output is #NUM!
The output should be: 0.8164966
I played with this a bit and didn't get anywhere - this article may explain why.
Link
it's complicated, and I think it's more than an excel problem
The following pdf has a nice write-up for using complex number functions in excel.
https://ccnet.stanford.edu/cgi-bin/course.cgi?cc=ee246&action=handout_download&handout_id=ID11300955936304
Seems like you have made a mistake inserting the parentheses.
The correct form is:
=COMPLEX(ABS((-1.5)*((1.5)^(-1.5))),0)
=0.816496580927726
This runs well in Excel 2013.