hi Guys,
heres my problem:
I Have a 3 sheet workbook 1.voucher 2.exam 3.report
on both sheet 1 and 2 - column one is a date column : dd/mm/yyyy
on sheet 3 i run reports on the other 2 sheets using SUMPRODUCT
example:
=SUMPRODUCT((Voucher!$A$7:$A$2099>=D4)+0,(Voucher!$A$7:$A$2099<=G4)+0,(Voucher!$C$7:$C$2099<>"")+0)
the sum product is searching through voucher range a7 -> a2099
- the d4 is a cell in reports with the start date and g4 has the end date that the user enters
i want to add the facility to print the rows between the date specified in d4 and g4 with a command button in sheet reports.
i found this snippet of code here and tried to change to suit me with no luck
range("b6:c6")
with selection
.printout
end with
i tried
range("reports!d4,g4")
with selection
.printout
end with
can anyone help please?
much appriciated for looking - if you dont have a solution advice is warmly accepted
davie
as an afterthought - it would be nice to choose whether to print range in both sheets or individually!!!
heres my problem:
I Have a 3 sheet workbook 1.voucher 2.exam 3.report
on both sheet 1 and 2 - column one is a date column : dd/mm/yyyy
on sheet 3 i run reports on the other 2 sheets using SUMPRODUCT
example:
=SUMPRODUCT((Voucher!$A$7:$A$2099>=D4)+0,(Voucher!$A$7:$A$2099<=G4)+0,(Voucher!$C$7:$C$2099<>"")+0)
the sum product is searching through voucher range a7 -> a2099
- the d4 is a cell in reports with the start date and g4 has the end date that the user enters
i want to add the facility to print the rows between the date specified in d4 and g4 with a command button in sheet reports.
i found this snippet of code here and tried to change to suit me with no luck
range("b6:c6")
with selection
.printout
end with
i tried
range("reports!d4,g4")
with selection
.printout
end with
can anyone help please?
much appriciated for looking - if you dont have a solution advice is warmly accepted
davie
as an afterthought - it would be nice to choose whether to print range in both sheets or individually!!!