Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Frantic Excel-er
 
Posts: n/a
Default Write code to insert multiple lines

Hi....

I have a spreadsheet that I need to do the following to

1. Find all projects in Column C, sort by project number
2. Insert 4 lines between each project category (there could be 1 to any
number of different categories)
3. Add debits and credits for each project number (in the debit and credit
column) on the second inserted line
4. After the debits and credits have been added in each column, then take
the credit total and subtract the debit total on the next line...

Here is example of what spreadsheet looks like:

Col.A Col. B Col. C Col. D
Col E(debit) Col. F
228 ,35108380 F05AX13599 74786000177 0 27.23
228 ,35108377 F05AX13599 74786000252 0 83.97
228 ,35108376 M04GX13503 44446000252 0 22.14
228 ,35108376 M04GX13503 44447000252 0 192.5

and there are more columns, but nothing needs to be done with them

Here is a copy of the code I have so far...

'
Columns("C:C").Find(What:="x").EntireRow.Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Sort Key1:=Range("C1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Columns("C:C").Find(What:="M0").EntireRow.Select

In this code, I am finding "x" because that denotes a project account, (also
have accts that are not related to projects). I was looking for M0 because
that would be the next project category after F, and since it is sorted
already, that would always be next...problem is, I might have M04, M05, F04,
F05...etc...

Any ideas how I can get this to do the steps I listed above?







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 do I insert a symbol BEFORE text for multiple cells in Excel? amspalinger Excel Worksheet Functions 6 May 17th 05 07:26 PM
Write a code by code Excel Discussion (Misc queries) 1 March 23rd 05 02:34 PM
Make Change Case in Excel a format rather than formula Kevin Excel Worksheet Functions 1 March 18th 05 08:53 PM
Will pay someone to write small event code for me!! [email protected] Excel Discussion (Misc queries) 2 February 26th 05 02:03 PM
Challenging Charting C TO Charts and Charting in Excel 0 January 17th 05 06:57 PM


All times are GMT +1. The time now is 03:35 AM.

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"