Make the worksheet dynamic

kvemperor

New Member
Joined
Jan 13, 2023
Messages
31
Office Version
  1. 2021
Platform
  1. Windows
sample.jpg

In this worksheet i have the function in cell G9 =B9+G8-E9 so every time i am putting a value in the column B or in the column E then when i drag down the cell (of the same row)in the column G then i have my result.Is it possible this to make it dynamic?(with vba or any other way? i mean instead of drugging down the cell of the column G down when i am putting a value in the column B or in the column E the result comes automatically in the column G.
I wouldn't mind when i was putting the date in the column F then automatically comes the result in the column G
thank you in advance
 
Still doesn t work but..
I just realize one thing.i the last two codes the cell changes .
what to i mean
in the cell I11 there is the function =D11+I10-G11 which is the correct
After i put the date in the cell B1. when i put value in the cell E11 the function (in the cell i11) changes to C11+I19-F11
That is why returns value error
We (you🥺)must fix this problem
 
Upvote 0

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
We (you🥺)must fix this problem
bad expression ! :cautious:
just I try you help you .so I must not solve it if I can't. just I'm volunteer
so now you must attach your file and put the formula manually in column I when you enter values in columns E or G .
 
Upvote 0
bad expression ! :cautious:
just I try you help you .so I must not solve it if I can't. just I'm volunteer
so now you must attach your file and put the formula manually in column I when you enter values in columns E or G .
I am sorry if i offended you.You already have done a lot of effort for me.
thank you anyway for all the trouble you had for me.I am grateful to you
 
Upvote 0
the formula in the code should be "=RC[-5]+R[-1]C-RC[-2]"

which is
RC[-5] = 5 columns to the left
R[-1]C = 1 row up
RC[-2] = 2 columns to the left
 
Upvote 0
the formula in the code should be "=RC[-5]+R[-1]C-RC[-2]"

which is
RC[-5] = 5 columns to the left
R[-1]C = 1 row up
RC[-2] = 2 columns to the left
Hallo my friend.thank you very much for your respond.it worked perfectly the way you told me.Now i put first the date in column B and when i put the value in column E the result comes automatically in column I.
One question only.What should i change in the code so,the result will come automatically when i put the value in column D instead of putting the value in column E ?
I tried many combinations but i didn t make it.If its difficult for you is ok,it works fine and like that
 
Upvote 0
change

If (Target.Column = 2 And Target.Row > 8) or (Target.Column = 5 And Target.Row > 8) Or ( Target.Column = 7 And Target.Row > 8 ) Then

to

If (Target.Column = 4 And Target.Row > 8) or (Target.Column = 2 And Target.Row > 8) or (Target.Column = 5 And Target.Row > 8) Or ( Target.Column = 7 And Target.Row > 8 ) Then

your checking to see which column has been updated col D = 4
 
Upvote 0
change

If (Target.Column = 2 And Target.Row > 8) or (Target.Column = 5 And Target.Row > 8) Or ( Target.Column = 7 And Target.Row > 8 ) Then

to

If (Target.Column = 4 And Target.Row > 8) or (Target.Column = 2 And Target.Row > 8) or (Target.Column = 5 And Target.Row > 8) Or ( Target.Column = 7 And Target.Row > 8 ) Then

your checking to see which column has been updated col D = 4
Thank you very much my friend for your effort.is not working like i would like but still works fine.Again thank you very much
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,869
Members
449,054
Latest member
juliecooper255

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top