Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-03-2013, 11:42 AM
bremen22 bremen22 is offline Counting Number of Months from a static date Windows 7 64bit Counting Number of Months from a static date Office 2007
Advanced Beginner
Counting Number of Months from a static date
 
Join Date: Jul 2013
Posts: 44
bremen22 is on a distinguished road
Question Counting Number of Months from a static date

I have a spreadsheet to show inventory usage since a location has opened. There are two sheets. Sheet 1 contains usage data for 1 month. Sheet 2 contains usage data with no restrictions. The data is generated by a data connection to an Oracle database.


Here is what I am trying to accomplish.....


On sheets 1 and 2 there is a Nomenclature Key. For each key that is on sheet 1 there will be a coresponding key on sheet 2. For each time the key appears on sheet 2 I want to get the sum of quantity used (col B). I then need to divide that by the number of months that has based from June 2012 until the month of the current system date.
Attached Files
File Type: xlsx Book1.xlsx (48.5 KB, 7 views)
Reply With Quote
  #2  
Old 09-03-2013, 03:16 PM
BobBridges's Avatar
BobBridges BobBridges is offline Counting Number of Months from a static date Windows 7 64bit Counting Number of Months from a static date Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default

Ok, first, to get the total from Sheet2 is simple: Use SUMIF instead of AVERAGEIF.

The number of months from 2012-06 to now: I'm sure there must be a built-in Excel function for that. Let me look... No, apparently not. But this article at Microsoft Support lists a formula that'll do it using the YEAR and MONTH functions.
Reply With Quote
  #3  
Old 09-04-2013, 05:14 AM
bremen22 bremen22 is offline Counting Number of Months from a static date Windows 7 64bit Counting Number of Months from a static date Office 2007
Advanced Beginner
Counting Number of Months from a static date
 
Join Date: Jul 2013
Posts: 44
bremen22 is on a distinguished road
Default

I was able to find the formula i need on that sheet. Thank you.

THe problem is now how do I divide Sheet 1 Column C by Sheet 2 cell H1?


See attached sample.
Attached Files
File Type: xlsx Book1.xlsx (49.3 KB, 11 views)
Reply With Quote
  #4  
Old 09-04-2013, 06:37 AM
BobBridges's Avatar
BobBridges BobBridges is offline Counting Number of Months from a static date Windows 7 64bit Counting Number of Months from a static date Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default

Ah, that's so easy you're going to kick yourself:
Code:
=SUMIF(Sheet2!A:A,B3,Sheet2!B:B)/Sheet2!H1
Any time you're not sure of the syntax of the addressing to another location (another sheet, in this case, or even another workbook), you can get Excel to tell you. Here's one way:
1) Select Sheet1 C3, which already has the SUMIF function laid out.
2) Hit <F2> to start editing the formula.
3) Type in the '/' for division. Do not hit <Enter> yet.
4) Navigate to Sheet2 and select H1. Note that Excel has now added the address for that cell to the formula bar.
5) Hit <Enter>.

Now you can copy the new formula to the rest of the cells on Sheet1!C:C. Oh, wait, your worksheet already does that; why? And I see I should have specified ".../Sheet2!H$1". Anyway, you can use that method to see how Excel handles lookups not only on other worksheets but on external workbooks as well.

Last edited by BobBridges; 09-04-2013 at 06:51 AM. Reason: Typo
Reply With Quote
  #5  
Old 11-25-2013, 11:57 AM
bremen22 bremen22 is offline Counting Number of Months from a static date Windows 7 64bit Counting Number of Months from a static date Office 2010 64bit
Advanced Beginner
Counting Number of Months from a static date
 
Join Date: Jul 2013
Posts: 44
bremen22 is on a distinguished road
Default

This got pushed to the way way way back burner, but I finally tested it out and it works. Thank you.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting Number of Months from a static date Number and date formatting dmarie123 Word VBA 5 02-28-2013 03:10 PM
Counting Number of Months from a static date Converting serial number to years, months and days hannu Excel 6 02-14-2013 09:21 PM
Counting Number of Months from a static date Adding months to a Date tsindos Word 4 10-04-2011 11:20 PM
Setting up recurring months to skip some months etc. dwelch@ykfireprevention.c Outlook 0 11-30-2010 10:15 AM
Help needed using the serial number date with sumifs - whole office is stumped FraserKitchell Excel 3 01-06-2010 12:24 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:40 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft