showing latest months data
Microsoft Office Training McAfee Secure sites help keep you safe from identity theft, credit card fraud, spyware, spam, viruses and online scams add this page to your favourites/bookmarksAdd to favourites
view a printable version of this pagePrintable version
email this page to somebodyEmail this page
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Showing 'latest' months data in a summary

Showing 'latest' months data in a summary

The UK's most regular instructor-led training courses.
Training information: excel/courses/london · Excel-courses-london · Microsoft Excel Training London
See also · excel-courses-london · excel courses in london · excel microsoft training

resolvedResolved · Urgent Priority · Version 2000

Showing 'latest' months data in a summary

Sheila has attended:
Excel Advanced course

by - delegate Sheila [4 posts] (2008 Jun 18 Wed, 11:36) replyReply

Hi,

I produce a report that shows data per month Jan - Dec then a final column as a summary.

In the final column for some criteria I need a total year to date so use the sum function. For others I need to pull through the latest entry.

What formula should I put in the final column to pull through the latest month's information rather than total the months so far?

I tried using IF statements and ISBLANK arguments, even adding hidden columns to allow the number of arguments but cannot so far make it work.

Your help is very much appreciated.

Thanks

Sheila

Excel Intermediate 1 day course
Version Date Location Places
available
Book Next place rate:
Card Invoice
2007 2009 Jan 12 Mon Bayswater 3 book now £224 £224
2007 2009 Jan 13 Tue Bloomsbury 1 book now £224 £224
2002/XP 2009 Jan 13 Tue Tooting 0 FULL    
2003 2009 Jan 15 Thu Southwark 1 book now £215 £215
2007 2009 Jan 20 Tue Bloomsbury 3 book now £224 £224
2003 2009 Jan 20 Tue Southwark 4 book now £207 £215
Full Schedule: See all 134 Excel Intermediate course dates.
Bookings currently available until 30th March 2010.

RE: showing 'latest' months data in a summary

by - trainer Jacob gold contributer[124 posts] (2008 Jun 18 Wed, 12:44) replyReply

Hi Sheila

To assist with your requirement will most likely involve some didicated time with a relevant trainer having access to your spreadsheet.

Naturally this will be consultative work and therefore billable.
If you wish to discuss this in more detail please do let us know.

Regards

Jacob

RE: showing 'latest' months data in a summary

by - trainer Stephen gold contributer[396 posts] (2008 Jun 18 Wed, 13:49) replyReply

Hi Sheila

Thank you for your question

I have created a custom function in VBA which solves your problem. To install it:

1. Press ALT_F11 to open VBE
2. Create a new module by clicking on the second betton from the left on the toolbar and choose "module".
3. Then copy and paste the following code into the code window (Large window on right hand side)

Function LastValue(VarRange As Range) As Single

Dim i As Integer
Dim intTemp As Single


For i = 1 To VarRange.Columns.Count

If VarRange.Cells(1, i).Value = 0 Then

LastValue = intTemp
Exit Function


Else

intTemp = VarRange.Cells(1, i).Value
LastValue = intTemp

End If

Next i



End Function


This creates a function called LastValue; to use it

1. Select the cell where you want the value to go
2. Click on the function wizard and choose the function from the user defined category
3. You will need to select the range of cells to be tested, (all columns from jan to dec)
4. Click OK

Hope this solves your problem. Let me know if you have any further problems

Regards

Stephen


RE: showing 'latest' months data in a summary

by - delegate Sheila [4 posts] (2008 Jun 19 Thu, 08:53) replyReply

Stephen,

This is brilliant! I had been wracking my brain for weeks to find a way to do this and everything I tried worked for a month but not for more than that.

One thing I have found is that I need to put 0.000001 formatted to 2 dec places as the default entry in my spreadsheet as otherwise, if the report delivers a 0 it doesn't show as Latest, nor does the next entry as the VBA looks for the first entry after a zero.

I know I know, I want the moon on a stick!

I'm very grateful for your help and it has also made me more eager to learn some VBA.

Cheers

Sheila


Related articles

· A Beginners Guide To Formulas In Excel
· Microsoft Excel Training: Not Just for Newbies Anymore
· Tap the Power of Recorded Macros with MS Excel Courses
· Microsoft Excel Training Advanced Courses - Making Data Validation Work For You
· Fun Things I've Done With Excel

Please browse our web site to find out more about
excel/courses/london and other Microsoft training courses.

Excel tip:

Manually rotating a 3D chart

To manually rotate a 3D chart;
Select the chart (edit mode) and click on one corner of the chart display area. A selection border will appear, using the left mouse button on one of the chart's "corners" (mouse pointer changes to a cross) drag the image which becomes a line representation of the chart (as you begin to drag) and rotate the chart to a view of your choice.
If you dont get it right first time, dont worry, the manoeuver is a little bit tricky.

View all Excel hints and tips

Rate this page:
3.0/5 (5 votes cast)
Institute of IT Training - Accredited Training Provider Microsoft Certified Partner
microsoft office
Microsoft Office Specialist Authorised Testing Centre (MOS and MCAS)

Prodigy Platinum Learning Partner

Institute of IT Training - Accredited Training Provider Association of Computer Trainers Valid HTML 4.01 Transitional
Valid CSS Markup

secure online payments - visa - mastercard

Mini sitemap. These are the main areas of our web site. Full sitemap.

Training by application Main information pages See also

Access courses
DreamWeaver courses
Excel courses
MS Project courses
Outlook courses
PowerPoint courses
VBA courses
Word courses
(more...)

Public scheduled courses
On-site training
Closed company courses

Training venues
Client list
FAQ
Pricing and availability
Course details / Syllabus

Access training
Dreamweaver training
Excel training
MS Project training
PowerPoint training

London Computer Training
Computer Training London
Microsoft Office training

Microsoft Access training
Microsoft Excel training
Microsoft Project training
Microsoft Outlook training
Microsoft Powerpoint training
Microsoft Word training

Time Management Course London

Interested in Access training? Please see the following pages:
Microsoft access courses · Microsoft training access course
Microsoft+access+training · Access courses in london

Training Information
Training Articles

AddThis Social Bookmark Button What's this?
Add to: Add to Del.icio.us Add to Facebook Add to Digg Add to Reddit Add to Google Add to Yahoo