I'm very new to VBA and never really used Excel for calculations.
That said, I've managed to get some VBA scripting working in a workbook, with the help of a few people from this forum.
https://www.mrexcel.com/forum/excel-questions/998055-improving-visual-basic-applications-execution-speed-when-writing-excel-worksheet.html#post4791407
I'm at the last step of this project (for now, at least), and I'm pretty excited that it's going so well.
One worksheet has a range of cells with this formula ='rTAB1'!H78/'rTAB2'!H78-1
(obviously, the formula updates relatively for each cell)
The "TAB1" refers to a data set on one worksheet, "TAB2" refers to a data set in the same workbook, but on a different worksheet.
I've written a VBA subroutine to populate two combo boxes with the names of all tabs/worksheets, in the workbook. The combo boxes
provide a simple way for the user to select two worksheets, in order to perform an operation.
The user will select 1 worksheet in each combo box, then click on a button to perform the next operation.
Then, my VBA code needs to update the formula in all of the cells, so that the formula uses the worksheet names from the combo boxes, selected by the user. I know how to get the selected Item in the combo boxes, but I don't know how to put that string into the formula for a cell, then copy that formula to the rest of the desired cell range.
I could use some help modifying the formula, then copying it to the rest of the cell range.
Apologies if I'm using incorrect terminology here. As I mentioned, I'm new to VBA and don't use Excel.
Thanks
That said, I've managed to get some VBA scripting working in a workbook, with the help of a few people from this forum.
https://www.mrexcel.com/forum/excel-questions/998055-improving-visual-basic-applications-execution-speed-when-writing-excel-worksheet.html#post4791407
I'm at the last step of this project (for now, at least), and I'm pretty excited that it's going so well.
One worksheet has a range of cells with this formula ='rTAB1'!H78/'rTAB2'!H78-1
(obviously, the formula updates relatively for each cell)
The "TAB1" refers to a data set on one worksheet, "TAB2" refers to a data set in the same workbook, but on a different worksheet.
I've written a VBA subroutine to populate two combo boxes with the names of all tabs/worksheets, in the workbook. The combo boxes
provide a simple way for the user to select two worksheets, in order to perform an operation.
The user will select 1 worksheet in each combo box, then click on a button to perform the next operation.
Then, my VBA code needs to update the formula in all of the cells, so that the formula uses the worksheet names from the combo boxes, selected by the user. I know how to get the selected Item in the combo boxes, but I don't know how to put that string into the formula for a cell, then copy that formula to the rest of the desired cell range.
I could use some help modifying the formula, then copying it to the rest of the cell range.
Apologies if I'm using incorrect terminology here. As I mentioned, I'm new to VBA and don't use Excel.
Thanks