LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Help with coding error

I am working with a home-grown budget project and I have a problem with a
bit of the code. I am attempting to justify a balance based on transactions
that have cleared versus pending transactions. I am setting the cell
interior.colorindex to highlight the amounts which have cleared. The problem
that I am having is that within a rangI have two transactions that are
exactly the same amount, one which has cleared and one that is pending. When
I run my code it ignores the colorindex property and adds both amounts. If I
change one of the entries the code works just fine.

Please, any help or pointers would be appreciated.

For Each c In ActiveSheet.Range("addon")
If c.Interior.ColorIndex < 6 Then

MyArr = Array(c.Value)

'Rcount = 0
With ActiveSheet.Range("addon")
'note - addon is a range created with union

For I = LBound(MyArr) To UBound(MyArr)
Set Rng = .find(What:=MyArr(I), _
LookIn:=xlValues)
If Not Rng Is Nothing Then
FirstAddress = Rng.Address
Do
Rcount = Rcount + 1
ActiveSheet.Range("Z" & Rcount).Value = Rng.Value
Set Rng = .FindNext(Rng)
Loop While Not Rng Is Nothing And Rng.Address <
FirstAddress
'ActiveSheet.Range("w1") = Rng.Address
End If
Next I
End With
'Application.ScreenUpdating = True
End If
Next c


 
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
coding error I don't know how to debug? sycsummit Excel Discussion (Misc queries) 1 April 22nd 09 07:27 PM
CODING ERRor N.F[_2_] Excel Discussion (Misc queries) 1 June 27th 07 09:02 PM
Excel Coding Error! Killer Excel Worksheet Functions 9 April 24th 06 01:51 AM
Error in VBA Coding in Macro Pooja Excel Programming 2 February 9th 06 04:07 PM
coding error tom mcdonald Excel Programming 2 June 16th 05 04:04 PM


All times are GMT +1. The time now is 10:37 PM.

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

About Us

"It's about Microsoft Excel"