![]() |
|
#3
|
|||
|
|||
|
Thank you Logit for your reply but it did not work.
Let me see if can get a better explanation. The code given to me in the below code will convert all numbers from positive to negative for any number in the range E4 through P45. Code:
Sub test()
Dim Cell As Range
Dim ws As Worksheet
For Each ws In Worksheets(Array("130R", "135R", "140R"))
For Each Cell In ws.Range("E4:P45")
If Cell.Value > 0 Then
Cell.Value = Cell.Value * -1
End If
Next Cell
Next ws
End Sub
This is now where a new macro or a modified macro is needed. New requirement: The modified macro will still need the following code: Code:
For Each ws In Worksheets(Array("130R", "135R", "140R"))
Local Advertising-Full Run General Advertising-Full Run Advertising-Insert-Local-Full Run Advertising-Classified-Display Advertising-Classified-Liners Advertising-Special Supplements Circulation-AAFES/NEX-Gross Sales Circulation-AAFES/NEX-Returns Circulation-AAFES/NEX-Gross Sales (Sun) Circulation-AAFES/NEX-Returns(Sun) Circulation-DECA-Gross Sales(M-Sat) Circulation-DECA-Returns(M-Sat) Circulation-DECA-Gross Sales(Sun) Circulation-DECA-Returns (Sun) Circulation-Home Delivery-Gross Sales Circulation-Home Delivery-Gross Sales (Sun) Circulation-All Other Single-Gross Sales Circulation-All Other Single-Returns Circulation-All Other Single-Gross Sales (Sun) Circulation-All Other Single-Returns (Sun) Circulation-Vending Machines-Gross Sales Foreign Currency Conversion Gains Circulation-Vending Machines-Pilferage Circulation-Vending Machines-Gross Sales (Sun) Circulation-Vending Machines-Returns (Sun) Circulation-Vending Machines-Pilferage (Sun) Circulation-Exercises/Maneuvers-Gross Sales Circulation-Exercises/Maneuvers-Gross Sales (Sun) Circulation-Mail Subscriptions-Gross Sales Circulation-Mail Subscriptions-Gross Sales (Sun) Circulation-Direct Drops-Gross Sales Circulation-Direct Drops-Gross Sales (Sun) Circulation-Bulk Sales-(Daily) Circulation-Bulk Sales-(Sunday) Other Printing Revenue Other Printing Services-Quick Print Foreign Currency Conversion Gains Other Publications Sales-Other Publ Delivery Advertising-Internet Revenue Other Revenue Out of the above listing or information in Column B, I would like the macro to only convert the following accounts from positive to negative numbers. Circulation-AAFES/NEX-Returns Circulation-AAFES/NEX-Returns(Sun) Circulation-DECA-Returns(M-Sat) Circulation-DECA-Returns (Sun) Circulation-All Other Single-Returns Circulation-All Other Single-Returns (Sun) Circulation-Vending Machines-Pilferage Circulation-Vending Machines-Returns (Sun) Circulation-Vending Machines-Pilferage (Sun) Therefore, since these are the only accounts that needs to be converted from positive numbers to negative numbers, then my question is if this is possible. I hope this clarify what is needed. Thank you all for your assistance and cooperation. Regards, rsrasc |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Macro to auto-save pdf using text on page + current date
|
hysterical.useless | Word VBA | 12 | 02-05-2018 02:17 PM |
macro, data import from the ONLY text file in current folder
|
ue418 | Excel Programming | 5 | 10-28-2017 12:52 PM |
| a macro that can copy data from copy.xls to our current excel macro.xls based on criteria: | udhaya | Excel Programming | 1 | 11-12-2015 10:12 AM |
| A macro that moves the current paragraph up or down? | New Daddy | Word VBA | 2 | 04-13-2014 02:25 PM |
Macro for moving one cell down from current position
|
Johnny thunder | Word VBA | 3 | 04-07-2011 04:44 PM |