Copy to New Sheet based on Criteria

Hi Guys,
I’m trying to set up a list generator for clients who order various products to remove unnecessary information for my coworkers. I’d like them to be able to paste a client list in the “Paste Here” sheet, press a button on the second sheet and have the relevant list generated on the third sheet. I can’t seem to get it to actually paste the values into the third sheet. Here’s what I have so far;

  Sub Rentals

dim sheet1 

Sheet1 = thiscomponent.sheets.getbyname("Paste Here")

dim sheet2 

sheet2 = thiscomponent.sheets.getbyname("Results")

Dim ora 

ora = sheet1.getcellrangebyname("B:F","N:P","T").rangeaddress

dim oca 

oca = sheet2.rangeaddress.endrow +1

dim rg as object

rg =sheet1.getcellrangebyname("I").rangeaddress

If rg is 1 then 


elseif rg is "" then exit sub

end if

end sub