# Copying "=today()" function from one sheet to second one?

#### Ronix

##### Board Regular
Hi Guys, with this code below I am copying row 3 from first sheet to the second one. First cell A3 contains "=today()" function and automatically is copied to second sheet where data archive is. So I dont wanna copy function of A3 cell of first sheet but only its value to the second sheet. How can I secure this in this code below?
Sub Makro1()

If Sheets(1).Range("A4") = "" Then
PR1 = 3
Else: PR1 = Sheets(1).Range("A3").End(xlDown).Row
End If
If Sheets(2).Range("A4") = "" Then
PR2 = 3
Else: PR2 = Sheets(2).Range("A3").End(xlDown).Row
End If

For i = 3 To PR1
For j = 3 To PR2
If Sheets(1).Range("A" & i) = Sheets(2).Range("A" & j) And Sheets(1).Range("B" & i) = Sheets(2).Range("B" & j) And Sheets(1).Range("C" & i) = Sheets(2).Range("C" & j) Then
Sheets(2).Range("E" & j) = Sheets(2).Range("E" & j) + Sheets(1).Range("E" & i)
Sheets(2).Range("F" & j) = Sheets(2).Range("F" & j) + Sheets(1).Range("F" & i)
Sheets(2).Range("G" & j) = Sheets(2).Range("G" & j) + Sheets(1).Range("G" & i)
GoTo DalsieI
End If
Next j
Sheets(1).Range("A" & i & ":G" & i).Copy (Sheets(2).Range("A" & (PR2 + 1)))
PR2 = PR2 + 1
DalsieI:
Next i

Sheets(2).Select
End Sub

### Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Maybe:

Rich (BB code):
``````Sheets(1).Range("A" & i & ":G" & i).Copy (Sheets(2).Range("A" & (PR2 + 1)))
With Sheets(2).Range("A" & (PR2 + 1))
.Value = .Value
End With``````

Thank you Andrew, it is working like a charm!

Replies
5
Views
125
Replies
15
Views
296
Replies
6
Views
149
Replies
26
Views
365
Replies
2
Views
573

1,203,534
Messages
6,055,954
Members
444,839
Latest member
laurajames

### 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?

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