If statement Problem

excobra

New Member
Joined
Jan 20, 2016
Messages
13
Guys ,


I have a chain of 4 hotels say from b7 to b10. Each hotel will take certain no of years to construct. once construction is finished it will start generating revenue from next year.




Table 1 shows the construction period where 1= construction and 0=no construction.


Table 2 This table should be automatically updated once construction finished and it should start earning revenue i.e. 1= revenue and 0= no revenue


Table 3 This is what i am getting using if statement which is wrong. Revenue should continue instead of just one year as shown in table 3


Please advice where is problem in my formula. End result should look like table 2

[FONT=source_sans_proregular]You can sdownload the file from here https://mega.nz/#!s58GwRpI!dJnT4kTq2Iop9lS-xDM-g7bgtZz5YSTz1KbtsPehXiY



[/FONT]
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
I never download so....

hotel1hotel2hotel3hotel4hotel5hotel6hotel7hotel8hotel9hotel10
01/01/2015start
01/07/2015startstart
01/01/2016finishstartstart
01/07/2016finishfinishstart
01/01/2017startfinishfinish
01/07/2017startfinish
01/01/2018finishstart
01/07/2018finishstart
01/01/2019finish
01/07/2019finish
hotelhotelhotelhotelhotelhotelhotelhotelhotelhotel
12345678910
01/01/20150000000000
01/07/20150000000000
01/01/20160R00000000
01/07/20160R00R000R0
01/01/20170R00RR0RR0
01/07/20170R00RR0RRR
01/01/20180R0RRR0RRR
01/07/2018RR0RRR0RRR
01/01/2019RR0RRRRRRR
01/07/2019RRRRRRRRRR
01/01/2020RRRRRRRRRR
01/07/2020RRRRRRRRRR
01/01/2021RRRRRRRRRR
01/07/2021RRRRRRRRRR
01/01/2022RRRRRRRRRR
01/07/2022RRRRRRRRRR
is this broadly what you want to see ?

<colgroup><col><col><col span="11"></colgroup><tbody>
</tbody>
 
Upvote 0
Here you go i have copied the data

Input Table
Construction Year 1 Year 2 Year 3 Year 4 Year 5 Year 6 Year 7 Year 8 Year 9 Year 10
Hotel 1 1 1 1 - - - - - - -
Hotel 2 - 1 1 - - - - - - -
Hotel 3 - - 1 1 - - - - - -
Hotel 4 - - - 1 1
Output Table
Revenue Desired table: This is what the actual result should look like
Hotel 1 - - - 1 1 1 1 1 1 1
Hotel 2 - - - 1 1 1 1 1 1 1
Hotel 3 - - - - 1 1 1 1 1 1
Hotel 4 - - - - - 1 1 1 1 1
Output Table
Revenue What I am actually getting using this formula
=IF(D7=1,0,IF(C7=0,0,1))
Hotel 1 - - - 1 - - - - - -
Hotel 2 - - - 1 - - - - - -
Hotel 3 - - - - 1 - - - - -
Hotel 4 - - - - - 1 - - - -

<colgroup><col><col span="12"><col></colgroup><tbody>
</tbody>
 
Last edited:
Upvote 0
ConstructionYear 1Year 2Year 3Year 4Year 5Year 6Year 7Year 8Year 9Year 10
Hotel 1111
Hotel 211
Hotel 311
Hotel 411
RevenueDesired table: This is what the actual result should look like
Hotel 1---1111111
Hotel 2---1111111
Hotel 3----111111
Hotel 4-----11111
Output Table
RevenueWhat I am actually getting using this formula
Hotel 1---1------
Hotel 2---1------
Hotel 3----1-----
Hotel 4-----1----
Year 1Year 2Year 3Year 4Year 5Year 6Year 7Year 8Year 9Year 10
Hotel 1111111row 28
Hotel 2111111
Hotel 311111
Hotel 41111
formula in cell B28 (hotel 1 year 1 )
=IF(LEFT(A$1,1)="Y",IF(B2="",IF(SUM(A2:$B2)>1,1,""),""),"")

<colgroup><col><col span="14"></colgroup><tbody>
</tbody>
 
Upvote 0
While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule #13 here along with the explanation: Forum Rules). This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 
Upvote 0

Forum statistics

Threads
1,215,573
Messages
6,125,608
Members
449,238
Latest member
wcbyers

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top