Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with macro

Status
Not open for further replies.

grecon

Technical User
Mar 8, 2007
78
US
Hi I want to write a excel macro to remove any negative number matching a particular order number, but I am an extrem novice to VBA. Could someone help me out? Thanks
 
Turn on the macro recorder.
Record yourself doing what you want to do manually.
Look at the resulting code (alt-F11).
Post back here with any questions.

_________________
Bob Rashkin
 
As Bong said, recording yourself doing the task will be a good start and also help us to help you.

If we are talking Excel then without code I would:
AutoFilter the data table (assuming that is what you have)
Apply filters to the Order column and to the column containing the numbers (I will call it "Values").
Select the Values heading.
Down arrow once (will move the selection to the first filtered row)
Ctrl-Shft-DownArrow will extend the selection to all the filtered data in that column
Delete will clear the contents of all those cells.



Gavin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top