J
Jim
I need help in creating a simple macro that will make it easier for a user to enter the CHOOSE function into a cell
A co-worker of mine needs to pull financial data that is laid out by month in columns into another sheet in the same workbook. The data is not laid out in the optimum way so inputting CHOOSE functions to pull the correct row from each sheet is tedious (requires 12 different cell inputs into the formula in addition to the index number). So I tried to create a macro that would help. I wanted a macro that would prompt the user for the cell containing the index number and prompt for the first of the twelve cells. The cells are all in adjacent columns in the same row so the macro would construct the rest of the formula
Using the input box feature and a line with ActiveCell.Formula that concatinated a combination of text and variable fields, I was able to construct a macro to do this. But the macro does not work across different worksheets. Everything needs to be in the same sheet. When the ActiveCell (where the formula is the be inserted) is in one sheet, the index number in another, and the data in still another sheet, I can't get the macro to pull in the worksheet nname information to properly construct the formula
I would share the few lines of code I put together for my simple macro but it is on my work PC and I'm now at home. But I thought I would make this post to see if someone could give me some guidance. Any help would be appreciated. In advance, Thanks
Regards,
A co-worker of mine needs to pull financial data that is laid out by month in columns into another sheet in the same workbook. The data is not laid out in the optimum way so inputting CHOOSE functions to pull the correct row from each sheet is tedious (requires 12 different cell inputs into the formula in addition to the index number). So I tried to create a macro that would help. I wanted a macro that would prompt the user for the cell containing the index number and prompt for the first of the twelve cells. The cells are all in adjacent columns in the same row so the macro would construct the rest of the formula
Using the input box feature and a line with ActiveCell.Formula that concatinated a combination of text and variable fields, I was able to construct a macro to do this. But the macro does not work across different worksheets. Everything needs to be in the same sheet. When the ActiveCell (where the formula is the be inserted) is in one sheet, the index number in another, and the data in still another sheet, I can't get the macro to pull in the worksheet nname information to properly construct the formula
I would share the few lines of code I put together for my simple macro but it is on my work PC and I'm now at home. But I thought I would make this post to see if someone could give me some guidance. Any help would be appreciated. In advance, Thanks
Regards,