Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default CTRKL-END of a Statement

I have an excel file that can have multiple pages of Financials. I like to
find a way to go to the end of the file and delete all records after that.
Reason is that I have a formula that I have used for the whole document and
may exceed the end of the document. The formula result will be "blank",
however, when printing, it goes to the end of formulated cells.
Is there a way to find the last "net income" and delete all rows after that?

Any help is appreciated.
Rich
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default CTRKL-END of a Statement

Hi there Rich,

Yes, I'm sure there is a way. Personally, I would think that getting at the
root of the problem would be easiest in the long run. It seems to me (in
what fleeting moments of sanity I have..) if we can control your formulas
and when they are entered and when they are not, you won't even have this
problem you've laid out for us. Would it be possible for you to manually
insert it everytime? Is the same formula copied down, row after row? If
so, a simple Ctrl + D will FillDown from the cell above it. Personally, I
use that all the time, daily in fact. Just saves me the trouble of doing
anything fancy. If this isn't an option, we can always use VBA.

This does bring one thing to mind, and it is very, very situation specific.
It all depends on how you structure/enter your data and how Excel see's your
data setup. In the Tools | Options | Edit (tab) menu, there is an option
for 'Edtend data range formats and formulas'. Look it up in the Help files.
Basically, Excel will enter formulas for you where the structure and formats
are the same for greater than 5 rows with the last 3 consecutive rows
unchanging. With this option checked/enabled, it can bring wonderful
results to a spreadsheet and save you time and frustration. (You can also
wow others in your office by the 'Magic Formula' that keeps appearing.
LOL!)

HTH

--
Regards,
Zack Barresse, aka firefytr, (GT = TFS FF Zack)


"Rich" wrote in message
...
I have an excel file that can have multiple pages of Financials. I like to
find a way to go to the end of the file and delete all records after that.
Reason is that I have a formula that I have used for the whole document
and
may exceed the end of the document. The formula result will be "blank",
however, when printing, it goes to the end of formulated cells.
Is there a way to find the last "net income" and delete all rows after
that?

Any help is appreciated.
Rich



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default CTRKL-END of a Statement

How about an alternative?

I'm gonna use column A as a column that always has something in it if that row
should print. You can change that if your formula is in a different column.

Insert|Name|Define
Names in workbook: Sheet1!LastRow
Use this formula
Refers to: =LOOKUP(2,1/(Sheet1!$A$1:$A$2000<""),ROW(Sheet1!$A$1:$A$2000) )

(Make that 2000 big enough to extend past the last possible row--but don't use
the whole column.)

Then once mo
Insert|Name|Define
Names in workbook: Sheet1!Print_Area
Use this formula
Refers to: =OFFSET(Sheet1!$A$1,0,0,lastRow,5)

That last 5 represents the last column to print (A:E).

And change the worksheet (sheet1) if necessary (in all the places).

Rich wrote:

I have an excel file that can have multiple pages of Financials. I like to
find a way to go to the end of the file and delete all records after that.
Reason is that I have a formula that I have used for the whole document and
may exceed the end of the document. The formula result will be "blank",
however, when printing, it goes to the end of formulated cells.
Is there a way to find the last "net income" and delete all rows after that?

Any help is appreciated.
Rich


--

Dave Peterson
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
IF statement inside a SUMIF statement.... or alternative method Sungibungi Excel Worksheet Functions 3 December 4th 09 06:22 PM
Reconcile Bank statement & Credit card statement & accounting data Bklynhyc Excel Worksheet Functions 0 October 7th 09 09:07 PM
Embedding an OR statement in an IF statement efficiently Chatnoir11 Excel Discussion (Misc queries) 4 February 2nd 09 08:12 PM
appending and IF statement to an existing IF statement spence Excel Worksheet Functions 1 February 28th 06 11:00 PM
If statement and Isblank statement Rodney C. Excel Worksheet Functions 0 January 18th 05 08:39 PM


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