Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm hoping someone might help with this. Bob kindly gave me some code but I
keep coming up with a user define error. I have spent a lot of time trying to figure it out but I haven't worked with "Chunk" before and my trusty manual isn't helping. My logic is letting me down somewhat too! Here's what I want to do. Search columns S and T and if both cells are empty at the same time, then subtotal down in both columns until the next entry in either column. I also want them to be bold font. Here's the script thus far.. Sub SubTots() Dim ans As Range Set ans = Nothing Set rg = Range("S:T").SpecialCells(xlCellTypeBlanks) For Each chunk In rg If chunk.Column = 19 And IsEmpty(chunk.Offset(0, 1)) Or _ chunk.Column = 20 And IsEmpty(chunk.Offset(0, -1)) Then If ans Is Nothing Then Set ans = chunk Else Set ans = Union(ans, chunk) End If End If Next ans.Select Application.SendKeys "%=" End Sub Can anyone help? Any help appreciated at this stage. This little bit is holding up a much larger project. Cheers Gai |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Count cells with fill color and retain code - Mr. Umlas Can you he | Excel Discussion (Misc queries) | |||
Excel 2007 user name not coming up | Excel Discussion (Misc queries) | |||
Need VBA Code to Let User Define Active Sheet | Excel Discussion (Misc queries) | |||
Excel User Conference - Early Registration Period Coming to an End | Excel Discussion (Misc queries) | |||
New user needing help with coming up with a formula | New Users to Excel |