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: 106
Default Insert Rows after word total

I would like to insert two rows after the word Total appears in Column A
except at the bottom of the working range as I don't want to insert lines
between Total and Grand Total.

Dim RngCell as Range
Dim rCell as Long
If InStr(1, LCase(RngCell.Value), "total") 0 then
Rows(rCell + 1 & ":" & rCell + 2).Insert

How do I tell the above code not to insert two rows if Grand Total (with a
space) appears in the row below total?

Thanks for your help.

--Elaine
 
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
Insert rows (1 to 4) if the cell value equals a fixed word Joy Excel Discussion (Misc queries) 1 July 20th 06 08:40 AM
Insert rows (1 to 4) if the cell value equals a fixed word. Joy Excel Programming 1 July 19th 06 02:37 PM
Autoatically insert blank row above total when no more rows Capsaisin Excel Programming 3 May 18th 06 11:55 PM
Insert Grand total at the end Payal[_2_] Excel Programming 1 April 9th 04 01:46 AM
Change Word Total and Grand Total Indu Aronson Excel Programming 2 February 16th 04 07:02 PM


All times are GMT +1. The time now is 07:05 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"