I want to create a formula showing me the days in a certain time period and multiplying that by a price.

I am creating a spreadsheet with renting prices for each month. and need help on the formula below.
Basically, I want to add up a total base rate for the nights people are staying. Can you please help me out with this?

Hi Caleb
Well, to begin with, if John checked out on December 1, he didn't stay any nights in November.
The formula is is bit involved due to the rate change. The version below handles this with a pair of IF statements that check to see if check in and check out occur in the same month.
If not, the first calculates the charges for the number of nights stayed in the check in month, and the second calculates the charges for the number of days stayed in the check out month. (E2)
If check in and check out occur in the same month, then the first calculates the charges for that month, and the second returns a null string ( "" ). (F2)
The results of these calculations, and the fixed booking fee (included in the formula, not gathered from Table 1), are summed in the next cell. (G2)
Formulas:
All are in Table 2, and are filled down their respective columns after being entered in the indicated cell.
E2: =IF(MOD(MONTH(D2)-MONTH(C2),12)=0,DATEDIF(C2,D2,"D")*VLOOKUP("unit "&B2,Table 1 :: $A:$N,MONTH(C2)+2,),DATEDIF(C2,EOMONTH(C2,0)+1,"D")*VLOOKUP("unit "&B2,Table 1 :: $A:$N,MONTH(C2)+2,))
F2: =IF(MOD(MONTH(D2)-MONTH(C2),12)=0,"",DATEDIF(EOMONTH(C2,0)+1,D2,"D")*VLOOKUP("u nit "&B2,Table 1 :: $A:$N,MONTH(D2)+2,))
G2: =SUM(E2,F2,60)
Note:In the present form, the formulas will correctly handle checkin/checkout dates in the same month or in two consecutive months (eg. November/December, December/January, etc.) but are not capable of determining the correct date for the rate change where the stay extends across two month ends.
The formulas could be combined by substituting the first and second (without their = signs) into the third, replacing "E2" and "F2" respectively. Writing them in that form originally makes for more chances to make an error, and makes the whole formula more difficult to read.
Details on each of the functions used may be found in the iWork Formulas and Functions User Guide, which you may download via the Help menu in Numbers '09.
Regards,
Barry

Similar Messages

  • Report workload by calculating how many versions of SharePoint list items created in a certain time period

    I have a total of 66 SharePoint 2010 lists - yes, 66! - each lists contains between 1500 and 3200 list items.  My employees update these various list items throughout their workday.  Each update to a list item creates a new version of the list
    item.  On average each list item will have anywhere from 5 to 10 versions before it is done.  I need to create a report that tells me how many list items they've updated in a certain time frame.  I have come close but still cannot arrive at
    the data I'm looking for. 
    This is what I have so far:
    I've created a report using SQL Report Builder 2008 v3 where I've filtered it to show only items MODIFIED between, for example, Feb1 and Feb28.  Of those records, I want the report to tell me how many versions were created during that time
    frame.  The result is one list item with 5 total versions.  Versions 1.0, 2.0, & 3.0 were created on 12/12/14.  The last two versions, 4.0 and 5.0, were created on 2/24/15.  Therefore, the answer I'm looking for is 2 because they
    created 2 versions between Feb1 and Feb28.
    However I get the following results using these queries:
    If I do a =Sum(Fields!owshiddenversion.Value) in the expression field I get the total versions which is 5
    If I do a =Count(Fields!owshiddenversion.Value) in the expression field I get the instance which is 1
    Is there a way to count ONLY the number of versions created in a time period?  Is there another hidden field in SharePoint that I can use in the expression that will give me results I'm looking for?

    Hi Rafael70,
    Per my understanding that you have already get all the need fields and informaiton of the updated version of list items and now you want to calculate how many versions of SharePoint list items created in a certain time period, you can't get desired result
    using sum and count function, right?
    I have tried to tested on my local environment but because I am not clear what is value in the field "owshiddenversion", I assumed you have two datatype parameters (StartDate and EndDate) to help filter the report in a certain time period.
    Generally, if you have add the filter correctly, it will filter the correct number's updated version in this time period, I would like you to provide details information as below to help better analysis the requirements:
    Could you please provide sample data of the table.
    Please provide snapshot of the report structure you have currently designed.
    Please try to provide all the expression you have used.
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • Can I edit the start time for all the podcasts from a single subscription downloaded to my itunes? i.e. want to creat a playlist of all the podcasts I have from a particular show...

    I want to creat a playlist of all the podcasts I have from a particular show, want to edit out the first minute on all to skip the intro. Do not want to edit over 200 podcast manually. Is there a solution?

    View menu -> Show Status Bar
    Then the total play time for any group of tracks you select in the Songs area, for any selected album or for any selected playlist will show at the bottom of the iTunes window as in previous versions.
    The ability to open playlists in separate windows was for some unfathomable reason removed in iTunes 11. Whether it will ever come back none of us here can say, but you can express your need for that feature via Apple's feedback page:
    http://www.apple.com/feedback/itunesapp.html
    Regards.

  • I Want to create a formulated form in Dreamweaver for a Muse site

    Hi,
    The form I want to create is more of a survey where each answer has a value and the values are calculated and displayed on the Page after pressing submit.
    How???
    Thanks

    Hi Ben, I just sat through this and not as helpful as I hoped.
    I need each answer to have a value and at the end a score to be provided.
    I can do this with Google Forms but not display the answer.  I have seen this form in action so I know this works, I just want to know how to do it.
    Hopefully there are some more ideas out there

  • I want to create a second library with the same account on a separate hard drive....

    Hi,
    I am running out of room on my iMac to store all of my iTunes music and video. I want to create a second library with the same account on a separate hard drive. Will iTunes Match match both libraries ? Will I be able to acess both libraries from all my devices? Can iTunes Match merge them together so I can have easy access to everything?
    Thanks for any advice.
    christos

    Unfortunately, you can't.  The primary address for your iCloud account must be a non-Apple email account.  The only exception to this is for former MobileMe subscribers who migrated to iCloud when MobileMe closed, which was 18 months ago.

  • I have a photo of an ice surface and another of a flower. Now I want to create a merged photo with the flower lying under the ice. I understand that I shall use the function "Layer" and have even read in the manual and looked on a video, but that informat

    I have a photo of an ice surface and another of a flower. Now I want to create a merged photo with the flower lying under the ice. I understand that I shall use the function "Layer" and have even read in the manual and looked on a video, but that information is not sufficiently detailed for me. I have tried several options, but I come now way. Generally it seems that your information is only for the ones who can, not for the people who can´t although it is we who really need to learn. Please give me a step by step (click by click) information on how I can get the ice above the flower and then make the ice partly transparent so the flower is seen underneath. Please send me an e-mail Erik Solbu [email protected]

    Open a new document big enough for your image. Then additional open your ice and flower image as well. Copy each and paste it into your blank document. They will be placed on their own separate layers.
    Make sure in your layers panel. (Bottom right) the ice is above the flower, by dragging it in place. In that same layers panel click the ice layer to select in and find the opacity meter above. Drag to the left until you get the effect you desire.

  • My iphone doesnt want to start.all it shows is the apple icon.nothing more.i have tried holding the home button together with the lock button.what can i do .thanks

    my iphone 4 doesnt want to start . all it shows is the apple icon.i have tried holding the home button together with the lock button. nothing seems to work . please help.

    Plug the iPhone in with the Wall Charger. Then while plugged in do the Reset again, hold both Home and Power buttons until the iPhone Restarts. This usually begins to happen in less than 20 seconds time.
    If you this does not work you can try to Restore the Firmware on your iPhone. If you decide to do this, connect your iPhone to your computer with iTunes open. Hold both the Home and Power buttons until the iPhone is detected by iTunes in Recovery Mode, this takes about 20 seconds time. Restore your iPhone.
    If this does not work, you can try to Restore the Firmware on your iPhone in DFU Mode. Connect your iPhone to your computer with iTunes open. Hold both Home and Power buttons for exactly 10 seconds, release the Power Button and keep holding the Home Button until iTunes recognizes the iPhone in Recovery Mode, about 20 seconds more time. Restore the iPhone.
    If this does not work and you have Warranty or AppleCare Coverage take your iPhone to Apple for resolution of the problem.

  • Purpose: to create photo galleries to insert or not items: 1) with phocagalery, it works 2) with the transfer via lightroom, I do not see the downloaded files but if I want to create a directory folder with the same name, he said he is already, I see noth

    purpose: to create photo galleries to insert or not items:
    1) with phocagalery, it works
    2) with the transfer via lightroom, I do not see the downloaded files but if I want to create a directory folder with the same name, he said he is already, I see nothing in the media in content management
    Can you help me

    Mahsa21,
    We are glad that we were able to resolve the international calling plan issue for you.  If you need assistance,please  reach out to us.
    thanks,
    Tonya D.

  • HT201210 when I want to make a call show me the call back page and i cant make call

    when I want to make a call show me the call back page and i cant make call

    You helped me a lot, man!
    I've been having the same problem for a long time ever since I changed to a new phone provider with a new sim which works with other phone except my iPhone 4.  I just wouldn't make call but can send SMS and receive calls.  Now, when I turned off 'call waiting' I could make phone calls.  Thanks a million again!
    P.S. When I turn on 'call waiting' again I could make call without problem any more.  What a heck!

  • I created an outline font and manipulated to create a new logotype. now i want to created a solid font from the outline as a single stroke -- how?

    i created an outline font and manipulated to create a new logotype. now i want to created a solid font from the outline as a single stroke -- how?

    g,
    As I (mis)understand it, you may have a look at the ways suggested in these threads, increasing the Stroke Weight as desired after creating the centre path:
    Re: How to make perfect thin inner outline of text?
    Typography effect

  • I was in full screen mode and now that I have exited, the main toolbar for Safari is gone.  So please don't say go to View.  Each time I click off of safari to the desktop, it shows me the Finder Toolbar.  I have opened and closed Safari many many times.

    I was in full screen mode and now that I have exited, the main toolbar for Safari is gone.  So please don't say go to View.  Each time I click off of safari to the desktop, it shows me the Finder Toolbar.  I have opened and closed Safari many many times.

    No no, if you read what I said, it would be that each individual display would be customizable to the user. The way you have it, it sounds like your second display will be dedicated to scrolling through fullscreen apps not allowing you to do it on the home screen. This is silly because with my concept, you could do that, by dragging apps to fullscreen in your second display, but if you want you could tell another display to scroll through fullscreen apps (independently) if you wanted. Each display will have it's own mission control with it's own set of desktops. I also can see how some people would still want them linked together, so this could just be a little check box made in mission control prefs to "link" or "unlink" desktops with link checked by default.
    With your solution you're limited to your setup. but what if the person has three or four displays? Well then your solution would limit them to one dedicated display that scrolls through fullscreen apps where mine lets a person customize their desktops depending on their preference and setup.
    further example: if you have safari, address book and mail in one display, you could still have ichat, PS and Illustrator in your second, and a text editor, FTP Client and iTunes in your third. Then you would mix and match these apps but it would promote the use of mulitple displays as well as benefit people with three or more, which thunderbolt, Cinema Display and Pro computers support.

  • HT4356 I have an older HP connected to the usb port of my Time Machine, and have it shared.  I want to print from my iPhone on the network, but it can not be found in airport?  How do I make this work?

    I have an older HP connected to the usb port of my Time Machine, and have it shared.  I want to print from my iPhone on the network, but it can not be found in airport?  How do I make this work?

    AirPrint printers connected to the USB port of the Apple AirPort Base Station or Time Capsules are not supported with AirPrint.
    Read through this for information about Airprint printers and how to use them:
    http://support.apple.com/kb/ht4356

  • I just received my new Mac Mini and want to migrate files from my Time Machine. I assume the old OS is on Time machine and I don't want it to supersede the new Yosemite OS. Do I have to Do anything special?

    I just received my new Mac Mini and want to migrate files from my Time Machine. I assume the old OS is on Time machine and I don't want it to supersede the new Yosemite OS. Do I have to Do anything special?

    Using Migrations Assistant will only move the data and other things over, it will not bring over a previous version of the Os since the 2014 model can run anything earlier than Yosemite.

  • HT4623 I want to purchase a ipad 32gb in the larger size but have read many bad reviews that the wifi does not stay connected and I don't want to have to buy another data package as I already own an iphone that i pay data for, what are my concerns

    I want to purchase an ipad 32gb in the larger size buy have read many bad reviews that they have problems staying connected to wifi.  I don't want to have to buy a data package so I only want the wifi one.  I already pay apple for my iphone data and I can't afford more money.  Why are there so many bad reviews and are the newer ones that much better, according to many reviews they are not.Please help

    I already pay apple for my iphone data
    You pay your carrier for data, not Apple.
    Why are there so many bad reviews
    Where? Regardless, there are always going to be a handful of people having some sort of issue with any given device, but I would not therefore assume that you would be one of them.

  • HT1918 I changed the card and i want to know how make to change the data from itunes. I tried and doesn't work.

    I changed the card and i want to know how make to change the data from itunes. I tried and doesn't work. Please, Help Me!

    No. That's not what I said. You can get an out of warranty replacement, which will be exactly the same model, color, and will be locked in exactly the same way the original is. If you want an iPhone 5, get the 4S replaced, sell it, and use the money to put toward a new phone.

Maybe you are looking for