VBA to Copy/Paste Data from 2 Excel tabs into a new Sheet, then Compare/Match -
right now, manually entering appointment , invoice data sql query template workbook several markets multiple stores within market.
step step process is:
1. filter store # "allappointments" tab.
2. copy rows store , paste new tab named "store xxx" in b3.
3. filter store # "allinvoices" tab.
4. copy rows store , paste made tab named "store xxx" under invoices header cell. (some stores not have invoices, blank/null).
5. in "store xxx", delete blank rows underneath data "allappointments" there no spaces between data "allappointments" , invoices header cell before data "allinvoices". (see "store xxx" tab example below)
6. in "store xxx", starting @ a3, write "yes" or "no" if firstname, lastname, , id appointment data match firstname, lastname, , appointmentid invoice data. (see "store xxx" tab example below)
7. (side note: have conditional format rule set once "yes" or "no" entered in cola a3, highlight row.)
i have each store in market. can see, tedious manual process, love learn how can make vba script automate of this, matching variables in #6, while looping through 1st 2 tabs ("allappointments" , "allinvoices") every store.
"allappointments" tab example ("allinvoices" tab similar): 
"store xxx" tab example:
as can see, both john doe & sally doe appear in both sections, "yes" in a3.
for steps 1-4
i want similar vba code 1st 4 steps above. however, how add request "copy range each store #, loop until stores done?"
sub sbcopyrangetoanothersheet() 'method 1 sheets("sheet1").range("a1:b10").copy destination:=sheets("sheet2").range("e1") 'method 2 'copy data sheets("sheet1").range("a1:b10").copy 'activate destination worksheet sheets("sheet2").activate 'select target range range("e1").select 'paste in target destination activesheet.paste application.cutcopymode = false end sub

Comments
Post a Comment