![]() |
#1
|
|||
|
|||
![]()
Hi all,
The following macro was given to me in a previous post and it is working great. 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 For example the below code will not changed Code:
For Each ws In Worksheets(Array("130R", "135R", "140R")) Code:
For Each Cell In ws.Range("E4:P45") If Cell.Value > 0 Then Cell.Value = Cell.Value * -1 In my file in column B, from row 4 to 43, I have different account numbers. For example, some of the accounts listed in Column B are the following: Circulation-All Other Single-Gross Sales Circulation-All Other Single-Gross Sales (Sun) Other Printing Revenue Other Printing Services-Quick Print Therefore, since only these accounts needs to be converted to negative, I was wondering how this can be accomplished. As always, thank you in advance for your assistance and cooperation. Cheers! rsrasc |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
hysterical.useless | Word VBA | 12 | 02-05-2018 02:17 PM |
![]() |
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 |
![]() |
Johnny thunder | Word VBA | 3 | 04-07-2011 04:44 PM |