Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I am trying to count no of nights for example stayed in a hotel,
For example You put in the dates in row 1 Fill then row 2 with "x" if stayed at hotel Need then another cell to calculate the number of nights that has been stayed at the hotel (the cells filled with "x"). Can anyone help? In advance thanks for your help |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Use Countif which takes a range and criteria
e.g. =COUNTF(B2:K2,"x") "Morten" wrote: I am trying to count no of nights for example stayed in a hotel, For example You put in the dates in row 1 Fill then row 2 with "x" if stayed at hotel Need then another cell to calculate the number of nights that has been stayed at the hotel (the cells filled with "x"). Can anyone help? In advance thanks for your help |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks for the quick response.
I am afraid it does not give me the correct answer. I need the number of nights between the dates, eg 3 days = 2 nights between 11th March - 13th March. RonaldoOneNil skrev: Use Countif which takes a range and criteria e.g. =COUNTF(B2:K2,"x") "Morten" wrote: I am trying to count no of nights for example stayed in a hotel, For example You put in the dates in row 1 Fill then row 2 with "x" if stayed at hotel Need then another cell to calculate the number of nights that has been stayed at the hotel (the cells filled with "x"). Can anyone help? In advance thanks for your help |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
If you need to reduce a number by 1, the function to use is subtraction.
Excel uses a minus sign for subtraction. If you want an answer of COUNTIF(B2:K2,"x")-1, the formula to use is =COUNTIF(B2:K2,"x")-1 -- David Biddulph "Morten" wrote in message ... Thanks for the quick response. I am afraid it does not give me the correct answer. I need the number of nights between the dates, eg 3 days = 2 nights between 11th March - 13th March. RonaldoOneNil skrev: Use Countif which takes a range and criteria e.g. =COUNTF(B2:K2,"x") "Morten" wrote: I am trying to count no of nights for example stayed in a hotel, For example You put in the dates in row 1 Fill then row 2 with "x" if stayed at hotel Need then another cell to calculate the number of nights that has been stayed at the hotel (the cells filled with "x"). Can anyone help? In advance thanks for your help |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=COUNTIF(B:B,"x")
I supposed that you meant COLUMN A for dates and COLUMN B for x's. Regards, Stefi €˛Morten€¯ ezt Ć*rta: I am trying to count no of nights for example stayed in a hotel, For example You put in the dates in row 1 Fill then row 2 with "x" if stayed at hotel Need then another cell to calculate the number of nights that has been stayed at the hotel (the cells filled with "x"). Can anyone help? In advance thanks for your help |
#6
![]() |
|||
|
|||
![]()
To count the number of nights stayed at a hotel, follow these steps:
__________________
I am not human. I am an Excel Wizard |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Count if 0 and between dates | Excel Worksheet Functions | |||
Count on dates | Excel Worksheet Functions | |||
Count Dates | Excel Discussion (Misc queries) | |||
I want to count the total Number of dates between two dates How? | Excel Worksheet Functions | |||
need to convert list of dates to count no. of dates by week | Excel Worksheet Functions |