Excel macro to increment the value by on from on sheet to other

banu_prashanth

New Member
Joined
Aug 7, 2013
Messages
1
I have two sheet in sheet1 i have department and question
[TABLE="width: 512"]
<colgroup><col style="width:48pt" span="8" width="64"> </colgroup><tbody>[TR]
[TD="class: xl65, width: 64, align: right"]
[/TD]
[TD="class: xl65, width: 64, align: right"]A[/TD]
[TD="class: xl65, width: 64, align: right"]B[/TD]
[TD="class: xl65, width: 64, align: right"]C[/TD]
[TD="class: xl65, width: 64, align: right"]D[/TD]
[TD="class: xl65, width: 64, align: right"]E[/TD]
[TD="class: xl65, width: 64, align: right"]F[/TD]
[TD="class: xl65, width: 64, align: right"]G[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]Q1
[/TD]
[TD="class: xl65, align: right"]4[/TD]
[TD="class: xl65, align: right"]4[/TD]
[TD="class: xl65, align: right"]4[/TD]
[TD="class: xl65, align: right"]4[/TD]
[TD="class: xl65, align: right"]4[/TD]
[TD="class: xl65, align: right"]4[/TD]
[TD="class: xl65, align: right"]4[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]Q2[/TD]
[TD="class: xl65, align: right"]4[/TD]
[TD="class: xl65, align: right"]2[/TD]
[TD="class: xl65, align: right"]3[/TD]
[TD="class: xl65, align: right"]3[/TD]
[TD="class: xl65, align: right"]4[/TD]
[TD="class: xl65, align: right"]4[/TD]
[TD="class: xl65, align: right"]4[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]Q3[/TD]
[TD="class: xl65, align: right"]4[/TD]
[TD="class: xl65, align: right"]1[/TD]
[TD="class: xl65, align: right"]3[/TD]
[TD="class: xl65, align: right"]3[/TD]
[TD="class: xl65, align: right"]4[/TD]
[TD="class: xl65, align: right"]3[/TD]
[TD="class: xl65, align: right"]3[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]Q4[/TD]
[TD="class: xl65, align: right"]4[/TD]
[TD="class: xl65, align: right"]1[/TD]
[TD="class: xl65, align: right"]3[/TD]
[TD="class: xl65, align: right"]4[/TD]
[TD="class: xl65, align: right"]3[/TD]
[TD="class: xl65, align: right"]3[/TD]
[TD="class: xl65, align: right"]3[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]Q5[/TD]
[TD="class: xl65, align: right"]4[/TD]
[TD="class: xl65, align: right"]2[/TD]
[TD="class: xl65, align: right"]2[/TD]
[TD="class: xl65, align: right"]3
[/TD]
[TD="class: xl65, align: right"]3[/TD]
[TD="class: xl65, align: right"]3[/TD]
[TD="class: xl65, align: right"]4[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]Q6[/TD]
[TD="class: xl65, align: right"]4[/TD]
[TD="class: xl65, align: right"]4[/TD]
[TD="class: xl65, align: right"]4[/TD]
[TD="class: xl65, align: right"]4[/TD]
[TD="class: xl65, align: right"]4[/TD]
[TD="class: xl65, align: right"]4[/TD]
[TD="class: xl65, align: right"]4[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]Q7[/TD]
[TD="class: xl65, align: right"]4[/TD]
[TD="class: xl65, align: right"]3[/TD]
[TD="class: xl65, align: right"]3[/TD]
[TD="class: xl65, align: right"]3[/TD]
[TD="class: xl65, align: right"]4[/TD]
[TD="class: xl65, align: right"]3[/TD]
[TD="class: xl65, align: right"]3[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]Q8[/TD]
[TD="class: xl65, align: right"]4[/TD]
[TD="class: xl65, align: right"]2[/TD]
[TD="class: xl65, align: right"]3[/TD]
[TD="class: xl65, align: right"]3[/TD]
[TD="class: xl65, align: right"]4[/TD]
[TD="class: xl65, align: right"]3[/TD]
[TD="class: xl65, align: right"]4[/TD]
[/TR]
</tbody>[/TABLE]

In the other sheet i have values from the above table if the user enter 4 in the sheet 1 i need to count it and
if a second user comes a put data in sheet 1 it should increment sheet 2 need macro for it...
[TABLE="width: 320"]
<colgroup><col style="width:48pt" span="5" width="64"> </colgroup><tbody>[TR]
[TD="class: xl65, width: 64"] [/TD]
[TD="class: xl66, width: 256, colspan: 4, align: center"]Department A
[/TD]
[/TR]
[TR]
[TD="class: xl65"] [/TD]
[TD="class: xl65, align: right"]1[/TD]
[TD="class: xl65, align: right"]2[/TD]
[TD="class: xl65, align: right"]3[/TD]
[TD="class: xl65, align: right"]4[/TD]
[/TR]
[TR]
[TD="class: xl67, align: right"]Q1
[/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65, align: right"]1[/TD]
[/TR]
[TR]
[TD="class: xl67, align: right"]Q2[/TD]
[TD="class: xl65"]
[/TD]
[TD="class: xl65"]
[/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65, align: right"]1[/TD]
[/TR]
[TR]
[TD="class: xl67, align: right"]Q3[/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65, align: right"]1[/TD]
[/TR]
[TR]
[TD="class: xl67, align: right"]Q4[/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65, align: right"]1[/TD]
[/TR]
[TR]
[TD="class: xl67, align: right"]Q5[/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65, align: right"]1[/TD]
[/TR]
[TR]
[TD="class: xl67, align: right"]Q6[/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65, align: right"]1[/TD]
[/TR]
[TR]
[TD="class: xl67, align: right"]Q7[/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65, align: right"]1[/TD]
[/TR]
[TR]
[TD="class: xl67, align: right"]Q8[/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65, align: right"]1[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Where is the second Dept A employee's score recorded in Sheet 1? Do the columns extend to the right for each employee? Or is the score in the first column overwritten? In the last case, then how do you know this has happened?
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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