Hi!
I have this code:
I want only values to be copied, not formulas.Please Login or Register to view this content.
Thanks for help!
PS: I'm really sorry for not posting the code as required. Hopefully it is fixed now.
Hi!
I have this code:
I want only values to be copied, not formulas.Please Login or Register to view this content.
Thanks for help!
PS: I'm really sorry for not posting the code as required. Hopefully it is fixed now.
Last edited by koli99; 06-04-2014 at 02:57 AM.
PHP Code:
Option Explicit
Sub Koli99()
Dim i As Long: Dim x As String
Dim wS As Worksheet, wS2 As Worksheet
Set wS = Sheets("DELOVNI NALOG")
For Each wS2 In ActiveWorkbook.Worksheets
If IsNumeric(wS2.Name) Then
' wS2.Activate '
On Error Resume Next
For i = 5 To 100 'For..Next:=> ws2.[Z5].resize(95,14).ClearContents '
wS2.Range(wS2.Cells(i, "Z"), wS2.Cells(i, "AM")).ClearContents
' wS2.Activate '
Next i
On Error GoTo 0
End If
Next wS2
' wS.Activate '
On Error Resume Next
MsgBox wS.Range("D" & Rows.Count).End(3)(1).Row
If wS.Range("D" & Rows.Count).End(3)(1).Row < 5 Then Exit Sub
For i = 5 To wS.Range("D" & Rows.Count).End(3)(1).Row
x = Range("D" & i).Value
Sheets(x).Range("Z" & Sheets(x).Range("D" & Rows.Count).End(3)(5).Row).Value = _
wS.Range(wS.Cells(i, "Z"), wS.Cells(i, "AM")).Value
' wS.Activate '
Next i
If Err > 0 Then On Error GoTo 0
End Sub
Sa DQ
I suggest you to refresh your page before to reply in a thread.
In this case OP complied with Mod request at 07:57 AM, but you posted your reply at 07:56 AM.
This time is only 1 minute difference and we accept it...but if the difference was biggest you would have problem with rule#7 of the forum...
Regards
Fotis.
-This is my Greek whisper to Europe.
--Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.
Advanced Excel Techniques: http://excelxor.com/
--KISS(Keep it simple Stupid)
--Bring them back.
---See about Acropolis of Athens.
--Visit Greece.
INTOPlease Login or Register to view this content.
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks