Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 287
Default Inserted rows, now need Counta function

It's not beautijful but it works so far!


Range("A5").Select

Do Until Len(ActiveCell) = 0
If ActiveCell.Offset(1, 0) = ActiveCell Then
ActiveCell.Offset(1, 0).Select
Else
ActiveCell.Offset(1, 0).EntireRow.Insert
ActiveCell.Offset(0, 1).Copy
ActiveCell.Offset(1, 1).PasteSpecial
ActiveCell.Offset(-1, 1).Copy
ActiveCell.Offset(0, 1).PasteSpecial
ActiveCell.Offset(0, 1).Value = "TOTAL"
ActiveCell.EntireRow.Font.ColorIndex = 3
ActiveCell.Offset(1, -2).Select
End If
Loop

Many thanks

"Rick Rothstein" wrote:

You say your code inserts a blank row after a change in name and inserts
"Total", but your example doesn't show this. Can you post the code you are
using to do your "insert"? It will probably be easier to handle the
insertion of the COUNTA function at the same time the word "Total" is
inserted.

--
Rick (MVP - Excel)


"Adam" wrote in message
...
Hi

I've got a data dump. I've figured out how to insert a blank row after a
change in name in column A and insert "Total" - so...

bill....
bill....
bill Total -
bob....
bob....
bob....
bob Total -

What I need in column C next to total is to insert the COUNTA function for
each person.

Any ideas?

cheers



.

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
Delete Consecutive Rows if counta(row #) is = Avi Excel Programming 1 August 4th 08 03:31 PM
Counta function Help Excel Worksheet Functions 3 July 2nd 08 07:01 PM
Counta and rows.. Ju Excel Worksheet Functions 9 February 20th 06 03:22 PM
Insert New Rows based on COUNTA() TheDPQ New Users to Excel 2 January 28th 06 03:07 AM
COUNTA Function not working =COUNTA(C3:C69,"NH") MikeinNH Excel Worksheet Functions 2 November 8th 04 01:19 AM


All times are GMT +1. The time now is 06:37 AM.

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"