How do i make a cell in excel stop calculating? - excel

I'm using wps spreadsheet which is similar to excel.
I'm trying to make a cell stop calculating at the end of the month, and keep the number of last day existing.
the existing code in k2 is:
=SUM(E2-I2)
For example: if on 01/31/2022 cell K2 says $2,000, then on 02/01/2022 it still says $2,000 but no longer grabs input from E2 and I2?
Thank you!

Let's say that the date the CELL K2 is updated is in Cell "MyDate", use this formula in K2. When the month doesn't match it stop.
=IF(MONTH(MyDate)=MONTH(NOW()),SUM(E2-I2),K2)
If needed you can also add the YEAR.

Related

How do I get around circular reference

I need help to go around circular refence on my code.
What the code does is copy a value from cell A2 unto a cell in the same row using the date in Row1 as reference. =IF(C1=$A$1, IF(ISBLANK($A2), ,$A2), ) .
This code does the job but the problem is when I change the date on Cell A1 to say like September 2, the value on Cell C2 returns to 0, I want it to maintain it's value after changing the date at cell A1.
This last image would be the ideal output but the code has circular reference which is not ideal as the whole sheet has 365days each row January1 to December31 and has 200rows.
The code =IF(C1=$A$1, IF(ISBLANK($A2), ,$A2), C2 )
What you are trying to ask it to do is:
IF my date header matches my date input header, then give me the cell details.
The problem is that when you change the date header it's no longer going to match for different dates and is going to re-evaluate with a 0. That's why this doesn't work.
Anytime you adjust that formula again, it's going to re-evaluate and you're going to be back to square 1.
That's why I can't give you a formula based answer BUT:
When the cell has taken it's reference for that date highlight it (eg. C2), press F2, and then press F9. It'll remove the formula and just leave the value behind. You have to do this before changing the header for A1 again.
If you're savvy, you can turn this into a macro. :)

Get week no list only between two dates in different years

I want to generate list of week numbers list between two dates of different years. I followed below formula as per the image I have attached. I want get blank after Excel the end date. According to my formula it continues. Please advise.
=ISOWEEKNUM($A$1+7*(ROWS($B$3:B3)-1))
Assuming the result should look like this...
...then you can use this formula:
=IF($A$1-WEEKDAY($A$1,3) +((ROW()-3)*7) <= $B$1-WEEKDAY($B$1,3), ISOWEEKNUM($A$1-WEEKDAY($A$1,3)+((ROW()-3)*7)), "")
Points to note:
1) It standardizes the dates on a first day of the week (Monday in this case).
2) It relies on ROW() - so the formula cells have to start in cell B3. This is what gives us the correct multiplier in increments of 7.
3) There may be a better (simpler) way.
In B3 enter:
=IF(A$1+7*(ROWS($1:1)-1)>B$1,"",ISOWEEKNUM(A$1+7*(ROWS($1:1)-1)))
and copy downward:

Count based on Week and Year for cells having Hyphens "-"

I have a tasks tracking sheet and want to count number of tasks received based on week number for a particular year. Thanks for the post COUNTIF date occurs in same week number and year
But still i have problem that i have dates in a column where many of the cells are non-empty and filled with Hyphens "-". If i delete Hyphens, formula working fine. But i need to keep "-" in cells where date not entered.
Initially i tried 'Sumproduct' funtion, it shows #Value error because of Hyphen in cells. And i added the code --(Task_Status!$X$7:$X$250<>"-"). But still it showing same error. In my formula, where Q2 is weeknumber 1 to 58 in a rage of cells Q2 to BQ2, that i have to copy(drag) the formula from Q3 to BQ3. And $C$3 is cell having 4 digit Year (E.g. 2019). Please help...
A image here-->Received&Completed_CW
=SUMPRODUCT(--(ISOWEEKNUM(Task_Status!$X$7:$X$250)=Q2),--(YEAR(Task_Status!$X$7:$X$250)=$C$3),--(Task_Status!$X$7:$X$250<>"-"))
Perfect i found a temporary formula... Its working fine if non-hyphen "-" exist until end of cell range specified by INDIRECT function...
=SUMPRODUCT(--(ISOWEEKNUM(INDIRECT("Task_Status!$X$7:$X"&COUNTIFS(Task_Status!$X$7:$X$250,"<>-")+6,TRUE))=Q2),--(YEAR(INDIRECT("Task_Status!$X$7:$X"&COUNTIFS(Task_Status!$X$7:$X$250,"<>-")+6,TRUE))=$C$3))
Please give a better solution than this if anyone found... Because still Hyphen present between start cell X7 and end of cell range specified by INDIRECT function give no result... still need help...
Thank you for all who tried for a solution... and thanks to post Excel Define a range based on a cell value and Using the value in a cell as a cell reference in a formula?

Distribute the value of a cell over multiple cells untill the remaining value is 0

I'm looking for a solution to automatically distribute the value of a cell (C3 till C10) based on the number of months (B7 till B10).
Anyone who can help me out with this formula?
First, you can make a helper row as showed in image attached starting with number 1.
Then apply below formula to cell(E5) and drag across the range.
Formula: "=IF($B5>=E$3,$C5/$B5,0)"
Related Image
Thanks
Abhinav
Type the following formula into cell E7:
= IF(COLUMN()-COLUMN($E7)+1<=$B7,$C7/$B7,0)
Then drag this cell over and then down as far as you need it.
For second part, to calculate amount of months you can add formula in cell("C4") as:
=MONTH(DATEVALUE(C3&"1"))-MONTH(C2)+1

Excel - Adding time due to specific value

I need help creating a formula in Excel. I want the formula to look at the value in a cell. If the value is "telephone", I want it to add 5 minutes to my elapsed time. If the value is "email/Fax", I want it to add 2-1/2 minutes. Please help?
Say the elapsed time is in A1 and the text is in cell B1In cell C1 enter:
=IF(B1="telephone",A1+TIME(0,5,0),IF(B1="email/Fax",A1+TIME(0,2,30),A1))

Resources