Hi everyone,
I have a problem writing a very simple vba.
The idea i have is Excel Problem.png
I want an event trigger that will calculate G3=G4/3 when i change G4 and the same trigger for G4=G3*3 when i change G3.
Thanks guys!
Hi everyone,
I have a problem writing a very simple vba.
The idea i have is Excel Problem.png
I want an event trigger that will calculate G3=G4/3 when i change G4 and the same trigger for G4=G3*3 when i change G3.
Thanks guys!
Right click on the sheet tab and click view code.
Copy the code and paste it into the blank window that comes up.
If your workbook is not a .xlsm macro enabled workbook you will have to save it as one.
Good Luck.
![]()
Please Login or Register to view this content.
try this way:
LE:![]()
Please Login or Register to view this content.
oh.. nevermind.. skywriter was faster!
.. and don't forget to have fun!
Bogdan.
mark SOLVED andAdd Reputation if my answer pleases you
Thanks Guys!
However,
When i copy and paste the copy. It doesn't seem to work.
Is it because of my merged cell?
I got the values to change, And because i have other cells uses this cell as an input, the value just keeps changing and runs into a loop
Hi, calvinloo,
any change in the codes supplied will trigger the event again as the other cell is changed.
Maybe try:
And avoid using MergedCells as they will create more problems than they may be good (they are definitely not needed and should be abandonned from Excel ASAP in my opinion). You may try Centered above from the context menu instead.![]()
Please Login or Register to view this content.
Ciao,
Holger
Use Code-Tags for showing your code: [code] Your Code here [/code]
Please mark your question Solved if there has been offered a solution that works fine for you
Thanks HaHoBe,
just one last thing. When i paste values into G3, G4 doesnt recalculate. Can that be fixed?
i mean when i goal seek the solution in G3, the new solution in G3 wont be taken?
I apologize for putting you into the loop. I forgot about disabling events. I shouldn't stay up so late.
Very kind of you to give me rep. points.
Thanks.
Good Luck.![]()
Hi, calvinloo,
I don´t have problems with pasting one cell as I don´t use MergedCells (which might be the reason for the code not working properly in your workbook).When i paste values into G3...
Correct me please but GoalSeek wasn´t mentioned before.i mean when i goal seek the solution in G3, the new solution in G3 wont be taken?
Ciao,
Holger
Yes, sorry i forgot to mention about goal seek into G3.
Is there a way to fix it?
Hi, calcinloo,
as we do not know how your GoalSeek is set up it may be a good idea to attach a sample workbook in order for us to see how we may help.
Ciao,
Holger
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks