View Single Post
 
Old 04-09-2015, 03:59 PM
charlesdh charlesdh is offline Windows 7 32bit Office 2010 32bit
Expert
 
Join Date: Apr 2014
Location: Mississippi
Posts: 382
charlesdh is on a distinguished road
Default

There is 1 thing about this code it will over write sheet1. If this is a problem you can use this line of code.

Code:
if Fpass = False And ActiveWorkbook.Sheets("Sheet1").Range("D8").Text = " " Then '' added the "and" statement
                        ActiveWorkbook.Sheets("Sheet1").Range("D8").Value = ws.Cells(Dcell.Row, 1).Text
                        ActiveWorkbook.Sheets("Sheet1").Range("D12").Value = ws.Cells(Dcell.Row, 2).Text
                        Fpass = True
                    End If
Reply With Quote