would like to search a worksheet and only put information where cells are blank

UMAKEMESIK

Active Member
Joined
Oct 3, 2005
Messages
378
I use this code from one worksheet to open another worksheet and
transfer data from selected cells

Code:
Workbooks.Open Filename:="R:\General\COVER SHEET_Protective\Protective Packaging Order Log.xlsm", Password:="PP", WriteResPassword:="PP"
       
        
        Set LastRow = Sheets("ORDER LOG").Cells(Rows.Count, 1).End(xlUp)
            
            With LastRow
            
.Offset(1, 0) = ws.[G3]
                  ActiveSheet.Hyperlinks.Add Anchor:=.Offset(1), _
 Address:="R:\General\COVER SHEET_Protective\" & Range("B2") & "\" & Range("C3") & "\" & Range("G3") & " - Order.xlsm"
 

  
.Offset(1).Font.Size = 14
             
                .Offset(1, 1) = ws.[B2]
                .Offset(1, 2) = ws.[C3]
                .Offset(1, 3) = ws.[G7]
                .Offset(1, 4) = ws.[c7]
                .Offset(1, 5) = ws.[G5]
                .Offset(1, 6) = ws.[D10]
                .Offset(1, 7) = ws.[D11]
                .Offset(1, 8) = ws.[D12]
                
                
            
            End With

I would like to submit the form again
but this time search Protective Packaging order log.xlsm

and look for ( in some sort of search, this is what I don't have figured out)
Code:
.Offset(1, 0) = ws.[G3]

Instead of setting that last row
can I start a search?

Code:
 Set LastRow = Sheets("SR LOG").Cells(Rows.Count, 1).End(xlUp)
            With LastRow

and possibly do something like this
I don't know the syntax so I made this up.

Code:
                .Offset(1, 7) = ws.[F32]
                .Offset(1, 8) = ws.[AB16]
                If Range("AB18").Value <> "" Then Next
            Else
            
                .Offset(1, 9) = ws.[AB18]
                If Range("p28").Value <> "" Then Next
            Else
            
                .Offset(1, 10) = ws.[P28]


thanks in advance
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,636
Latest member
laura12345

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?

Disable AdBlock

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
Back
Top