How about THIS for a request!

Audiojoe

Active Member
Joined
Feb 20, 2002
Messages
285
What I need is a macro on a sheet, that will print all the rows. EXCEPT, that I only want it to print the rows that have the word 'Completed' in Column I.

These are few and far between so instead of having reams of paper, I need it so that when it prints out, all the selected rows are together if you know what I mean?

Is this going to be possible do you think, or is it too much to ask?
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Hi
Can't you just record this using autofilter and set that to completet in column I, print and remove autofilter ???

regards Tommy
 
Upvote 0
Would be great, except that each sheet is being used by a spotty 15 year old, numnuts customer service agent, who thinks that VBA is some kind of sexually transmitted disease. The concept of logging off had to be explained to them 5 times, as when they were commanded to do it, 90% of them ran in the direction of the toilets.

I'm really going to need a big button for them to push that will do it all. Can anyone help?
 
Upvote 0
By the way, I tried Tommy's suggestion and it didn't work. I dont know what's wrong with my system today!
 
Upvote 0
Hi
Try this then. In basic it the same thing

Sub Makro1()
Range("A1").Select
Application.CutCopyMode = False
Selection.AutoFilter
Selection.AutoFilter Field:=9, Criteria1:="Completed"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Selection.AutoFilter
End Sub

regards Tommy
 
Upvote 0
This is REALLY annoying me now!! All day, people have been sending me really good code, and my stupid PC won't play any of them. It keeps throwing back a 1004 error 'method of Range Class Failed'

Can anyone tell me if there's a setting I should change to stop this happening. Do I have to change my references maybe?

My PC's monitor is sweating right now as it knows it only has a few more hours in which to do as I tell it before it learns to fly.

"3f9oijoiurgjv23`"

Oh, like that is it? Gonna start f@#king up my 5ords wh@n I tripe them a{e yo?

"iui weuif0-4-098rti0"

You're heading for a fall my lad
 
Upvote 0
Unfortunately, due to company privacy laws, I can't send any files out unless pre-approved. So I asked the manager and he said he'll get a "technician" out on Monday

Bad News: In reality, it'll be Tuesday
Good News: I get to scratch my a*se for 5 days

Thanks anyway for the offer man
 
Upvote 0
Ok Audiojoe
then try to remove the first line of my code (range("A1").select),
select a cell i the data range and run it again.

Tommy
 
Upvote 0
hi,

1004 errors are a pain in the proverbial...

I would suggest that a cold restart will help, I sometimes works for me.... usually better for the opperator i find! :)

otherwise the reference could be wrong, i assume you have the ms office object browser 9.0 selected, I really don't know why but mine keeps turning itself off and i get erroras like that..??

all the best and I hope that tues is a long itme in coming!!

Ed
 
Upvote 0

Forum statistics

Threads
1,213,544
Messages
6,114,249
Members
448,556
Latest member
peterhess2002

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