Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to remove a * signs from name virag Excel Discussion (Misc queries) 2 March 18th 10 06:26 AM
pound signs awh Excel Discussion (Misc queries) 3 June 28th 07 07:46 PM
# signs where there shouldn't be.... dramajuana Excel Discussion (Misc queries) 1 August 14th 06 10:20 PM
# signs where there shouldn't be.... MarkM Excel Discussion (Misc queries) 0 August 14th 06 07:34 PM
# signs where there shouldn't be.... [email protected] Excel Discussion (Misc queries) 0 August 14th 06 07:29 PM


All times are GMT +1. The time now is 01:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"