hi,

I am trying to copy values from E1:E100 range in sheet 11"Software" to sheet "BOQ" under a specific heading whose address is set to change everytime. I have managed to write a code, seeking help for the web and modify it accordingly, I have to ignore the blank cell and a text string"refrnce No" and merge the same value together. I have skipped the merging part for now. The code I have written is.
Public Sub copy_frm_soft_to_BOQ()
    Dim rowIndex As Integer
    Dim dataRange As Range
    Dim newRow As Integer
   
    Set dataRange = Sheet11.Range("E1:E100")
        For rowIndex = 1 To dataRange.Rows.Count
            With dataRange.Cells(rowIndex, 1)
            newRow = 22 ' to be edited later the starting row will change everytime !

            '// ignore empty cells
            If .Value <> "" Then ' the error comes here
                newRow = newRow + 1
                Worksheets("BOQ").Cells(newRow, 1) = Worksheets("Software").Cells(rowIndex, 1)
                End If

            End With
        Next rowIndex
   End Sub
But whenever I am trying to run the code, it is giving and error "Type Mismatch".
Advise me on this.