Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Switch Signs
Hi everyone. I have a large block of data. In column A is an account
number. In columns B thru Z is numerical data. Is there a way to programatically scan column A, and if the last 4 characters in the contents of column A are 888Z, then change the sign of the numbers in columns B thru Z of the same row? Thanks in advance! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Switch Signs
Sub ChangeSign()
Dim i As Long Dim j As Long For i = 1 To Range("A65536").End(xlUp).Row 'For each row If Right(Cells(i, 1), 4) = "888Z" Then For j = 2 To 26 Cells(i, j) = -Cells(i, j) Next j End If Next i End Sub On Wed, 15 Mar 2006 09:38:35 -0500, "Steph" wrote: Hi everyone. I have a large block of data. In column A is an account number. In columns B thru Z is numerical data. Is there a way to programatically scan column A, and if the last 4 characters in the contents of column A are 888Z, then change the sign of the numbers in columns B thru Z of the same row? Thanks in advance! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to remove a * signs from name | Excel Discussion (Misc queries) | |||
pound signs | Excel Discussion (Misc queries) | |||
# signs where there shouldn't be.... | Excel Discussion (Misc queries) | |||
# signs where there shouldn't be.... | Excel Discussion (Misc queries) | |||
# signs where there shouldn't be.... | Excel Discussion (Misc queries) |