Thanks in advance.
If there's anyone out there with the knowledge to this all, I would be very delighted ;-) And that doesn't have to be in VBA, a sollution in excel-formulas is welcome also if possible.

I'm trying to do the following:
There is a worksheet with 6000+ companynames. Another worksheet shows it's types of tasks that can be signed to every single company.
I want to create a new worksheet with n-times every companyname and after it's last column on every row one of the tasks.

**Worksheet1:**

CompanyA|AdressA|CityA

CompanyB|AdressB|CityB

**Worksheet2:**

Task1|Explanation1|Duration1

Task2|Explanation2|Duration2

**New Worksheet3 to create:**

CompanyA|AdressA|CityA|Task1|Explanation1|Duration1

CompanyA|AdressA|CityA|Task2|Explanation2|Duration2

CompanyB|AdressB|CityB|Task1|Explanation1|Duration1

CompanyB|AdressB|CityB|Task2|Explanation2|Duration2

My way of **starting** is copying the rows of worksheet1 n-times and I found an older thread that could be usefull.
This is where I found something about copying 1 row multiple times

I custommade it a little (my excel version is Dutch, so "sheet" is "blad"). Unfortunatly this doesn't work and gives an error.

```
Sub DuplicateRows()
Dim currentRow As Integer
Dim currentNewSheetRow As Integer: currentNewSheetRow = 1
For currentRow = 1 To 5 'The last row of your data
Dim timesToDuplicate As Integer
timesToDuplicate = CInt(Blad1.Range("O" & currentRow).Value2) ' Error line
Dim i As Integer
For i = 1 To timesToDuplicate
Blad3.Range("A" & currentNewSheetRow).Value2 = Blad1.Range("A" & currentRow).Value2
Blad3.Range("B" & currentNewSheetRow).Value2 = Blad1.Range("B" & currentRow).Value2
Blad3.Range("C" & currentNewSheetRow).Value2 = Blad1.Range("C" & currentRow).Value2
currentNewSheetRow = currentNewSheetRow + 1
Next i
Next currentRow
End Sub
```

The error appears on this line (error 13 Type mismatch):

`timesToDuplicate = CInt(Blad1.Range("O" & currentRow).Value2)`