Copy and paste of the data between sheets with add/subtract
-
- Banned
- Posts: 233
- Joined: 28 Jul 2018, 17:29
Copy and paste of the data between sheets with add/subtract
Copy and paste of the data between sheets with add/subtract
Plz see the sample file
Everything is mentioned and shown
if any doubts plz let me know
Plz see the sample file
Everything is mentioned and shown
if any doubts plz let me know
You do not have the required permissions to view the files attached to this post.
-
- Administrator
- Posts: 78535
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Copy and paste of the data between sheets with add/subtr
Please explain clearly and explicitly what we should add or subtract.
Best wishes,
Hans
Hans
-
- 2StarLounger
- Posts: 128
- Joined: 08 Mar 2010, 13:53
- Location: Missouri
Re: Copy and paste of the data between sheets with add/subtr
Your comments in the sheets did not help, explain better por favor.
Regards,
Oliver
“Just because something doesn't do what you planned it to do doesn't mean it's useless.” -Thomas Edison
Oliver
“Just because something doesn't do what you planned it to do doesn't mean it's useless.” -Thomas Edison
-
- Banned
- Posts: 233
- Joined: 28 Jul 2018, 17:29
Re: Copy and paste of the data between sheets with add/subtr
Now plz look into it
Plz see all sheets
Plz see all sheets
You do not have the required permissions to view the files attached to this post.
-
- Administrator
- Posts: 78535
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Copy and paste of the data between sheets with add/subtr
This is basically just a variation of the questions you've been asking before. You should be able to modify the macros that we have already given you to add/subtract the numbers.
Best wishes,
Hans
Hans
-
- Banned
- Posts: 233
- Joined: 28 Jul 2018, 17:29
Re: Copy and paste of the data between sheets with add/subtr
Sir can u share the link bcoz as i remember This is my first question
-
- Administrator
- Posts: 78535
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Copy and paste of the data between sheets with add/subtr
See for example:
http://www.eileenslounge.com/viewtopic.php?f=30&t=30646" onclick="window.open(this.href);return false;
http://www.eileenslounge.com/viewtopic.php?f=30&t=30643" onclick="window.open(this.href);return false;
http://www.eileenslounge.com/viewtopic.php?f=30&t=30646" onclick="window.open(this.href);return false;
http://www.eileenslounge.com/viewtopic.php?f=30&t=30643" onclick="window.open(this.href);return false;
Best wishes,
Hans
Hans
-
- Banned
- Posts: 233
- Joined: 28 Jul 2018, 17:29
Re: Copy and paste of the data between sheets with add/subtr
that solution and that question was the first pasrt this is the second part
plz see the sample file once again i am highlighting the cells where we have paste the data by adding and subtracting
see sheet5 i have highlighted the cells
see sheet6 for the result
plz see the sample file once again i am highlighting the cells where we have paste the data by adding and subtracting
see sheet5 i have highlighted the cells
see sheet6 for the result
You do not have the required permissions to view the files attached to this post.
-
- Administrator
- Posts: 78535
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Copy and paste of the data between sheets with add/subtr
Please study the code that I wrote for you, and try to modify it to do what you want.
Best wishes,
Hans
Hans
-
- Banned
- Posts: 233
- Joined: 28 Jul 2018, 17:29
Re: Copy and paste of the data between sheets with add/subtr
Oh i am so sorry HansV Sir, My mistake
Wasted ur precious time Sorry
Thnx HansV Sir for ur great great Support
Have a Great Day
Wasted ur precious time Sorry
Thnx HansV Sir for ur great great Support
Have a Great Day
-
- Banned
- Posts: 233
- Joined: 28 Jul 2018, 17:29
Re: Copy and paste of the data between sheets with add/subtr
HansV sir i tried to edit the code but i failed
Plz look into this problem
Plz look into this problem
-
- 2StarLounger
- Posts: 128
- Joined: 08 Mar 2010, 13:53
- Location: Missouri
Re: Copy and paste of the data between sheets with add/subtr
Leonardo you should try a little harder...
Here is a variation of Hans' code.
Here is a variation of Hans' code.
Code: Select all
Sub CopyData()
Dim w1 As Worksheet
Dim w2 As Worksheet
Dim w3 As Worksheet
Dim r1 As Long
Dim r3 As Long
Dim m As Long
Application.ScreenUpdating = False
Set w1 = Worksheets("Sheet5")
Set w2 = Worksheets("Sheet6")
Set w3 = Worksheets("Sheet3")
m = w3.Range("A" & w3.Rows.Count).End(xlUp).Row
For r3 = 2 To m
r1 = r1 + 1
w2.Range("A1").EntireRow.Copy Destination:=w1.Range("A" & r1)
w1.Range("C" & r1).Value = w3.Range("B" & r3).Value
r1 = r1 + 1
w2.Range("A3").EntireRow.Copy Destination:=w1.Range("A" & r1)
w1.Range("G" & r1).Value = w3.Range("D" & r3).Value - 0.1
w1.Range("L" & r1).Value = w3.Range("D" & r3).Value - 0.05
w1.Range("C" & r1).Value = w3.Range("B" & r3).Value
Next r3
Set w3 = Worksheets("Sheet4")
m = w3.Range("A" & w3.Rows.Count).End(xlUp).Row
For r3 = 2 To m
r1 = r1 + 1
w2.Range("A2").EntireRow.Copy Destination:=w1.Range("A" & r1)
w1.Range("C" & r1).Value = w3.Range("B" & r3).Value
r1 = r1 + 1
w2.Range("A4").EntireRow.Copy Destination:=w1.Range("A" & r1)
w1.Range("G" & r1).Value = w3.Range("D" & r3).Value + 0.1
w1.Range("L" & r1).Value = w3.Range("D" & r3).Value + 0.05
w1.Range("C" & r1).Value = w3.Range("B" & r3).Value
Next r3
Application.ScreenUpdating = True
End Sub
Regards,
Oliver
“Just because something doesn't do what you planned it to do doesn't mean it's useless.” -Thomas Edison
Oliver
“Just because something doesn't do what you planned it to do doesn't mean it's useless.” -Thomas Edison
-
- Banned
- Posts: 233
- Joined: 28 Jul 2018, 17:29
Re: Copy and paste of the data between sheets with add/subtr
Thnx Oliver for giving ur precious time and great support to this post
Problem Solved
Problem Solved
-
- 2StarLounger
- Posts: 128
- Joined: 08 Mar 2010, 13:53
- Location: Missouri
Re: Copy and paste of the data between sheets with add/subtr
Leonardo I encourage you to look into these links: 1, 2, 3, 4, 5.
These are awesome VBA training resources provided to me by HansV & Rudi.
Regards,
Oliver
“Just because something doesn't do what you planned it to do doesn't mean it's useless.” -Thomas Edison
Oliver
“Just because something doesn't do what you planned it to do doesn't mean it's useless.” -Thomas Edison
-
- Banned
- Posts: 233
- Joined: 28 Jul 2018, 17:29
Re: Copy and paste of the data between sheets with add/subtr
Thnx Oliver, Rudi, HansV Sir for the info