Say I have a formula in cell A1 of sheet 1. This formula references cell A1 of sheet 2. Is there a macro that, when run, will make the formula reference B1 of sheet 2, and when run again, C1?
Thanks in advance
Say I have a formula in cell A1 of sheet 1. This formula references cell A1 of sheet 2. Is there a macro that, when run, will make the formula reference B1 of sheet 2, and when run again, C1?
Thanks in advance
What's the formula? Is it just the one reference e.g.; =Sheet2!A1, or more complicated?
Surround your VBA code with CODE tags e.g.;
[CODE]your VBA code here[/CODE]
The # button in the forum editor will apply CODE tags around your selected text.
If it is the formula @AlphaFrog suggests, try this.
Though I have to say, this is one of those times I hope someone embarrasses me with like a 2 line solution, because this feels....kinda roundabout.
Please Login or Register to view this content.
I'm interested in starting a career working with VBA, if anyone knows of any opportunities!
A three line solution for what it's worth...
Please Login or Register to view this content.
Being a tiny bit more specific, there are two formulas that are affected; 'Sheet1'!C3 ='MULTIPLIERS cost'!$A$1 and 'Sheet1'!D3 ='MULTIPLIERS cost'!D3
Awesome, thanks. I knew it would be something like that, but just couldn't think how to use Offset. Kudos, very nice code. And I'm calling that a 1-line solution.
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks