Forum Discussion
alvarezb
Apr 13, 2021Copper Contributor
conditional formatting based on content of another cell
Hi all. I cannot figure out how to colour one cell based on the content of another. I have successfully formatted one cell to be red if its empty and orange if it is non empty. However, I don't ...
- Jul 29, 2021
Just to clarify.... I was not suggesting any change in your format or frequency of data. It was not clear to me what problem you wanted to solve. So my intention was only to demonstrate the TWRR calculation. I should have made that clear the first time. Sorry.
-----
Re: ``I'm aiming to find a way to calculate it basically the same way my bank does``
To that end, it would be helpful to see what the "bank" calculates, and how it is reported.
Re: ``nor is my first language English, so there may have been some lost in translation``
I understand. And to make matters worse, IMHO, the financial community uses terminology that is misleading or confusing, even to a native English speaker.
That is why a concrete example of the actual calculations that you want to accomplish would be helpful.
I will try to keep my English as simple as possible. But my English is not so good either, being a born American (wink). So feel free to ask for clarification, as needed.
-----
Re: ``Correct me if I'm wrong, but if I want to use your provided formula - I need to extract the dates for deposits?``
Yes. The purpose of the TWRR is to reflect the true market rate of return, excluding "external factors" like deposits and withdrawals.
For example, if the ending balance was 100,000 yesterday, and the ending balance is 110,000 today because the market rate of return was 1% (1000) and we deposited 9000, we want the TWRR to be 1% (101000/100000 - 1), not 10% (110000/100000 - 1).
Suppose 6 days later, the ending balance is 120,000 because the market rate of return over that period was again 1% (1100) and we deposited 8900 on the last day. Again, we want the TWRR for that period to be 1% (111100/110000 - 1), not 9.09% (120000/110000 - 1).
And the cumulative market rate of return and TWRR for the total of 7 days is (1+1%)*(1+1%) - 1 = 2.01%, not 120000/100000 - 1 = 20%.
With that in mind, see the attached Excel file.
The TWRR in column E is the __cumulative__ market rate of return.As a proof of concept, see the periodic market rate of return and the cumulative market rate of return that are calculated in columns G and H.
-----
If the cumulative period is a year or less, investment firms report the cumulative TWRR.
But if the cumulative period is more than a year, investment firms report the average compounded annual TWRR, which might be calculated by (1+cumTWRR)^(days/365) - 1.
Jrics
Mar 19, 2024Copper Contributor
I am trying to get a cell to say "NO" when the cell next to it is blank" how do I do this in conditional formatting?
- HansVogelaarMar 19, 2024MVP
You don't need conditional formatting for that - you can use a formula.
Let's say you want NO in column B if the corresponding cell in column A is blank, starting in row 2.
In B2:
=IF(A2="", "NO", "")
Fill down.
- JricsMar 19, 2024Copper ContributorYes I know that but what I failed to mentions the first post was I need the "NO" to be Red and Bold and the "YES" to be Green and Bold.
- HansVogelaarMar 19, 2024MVP
Change the formula to
=IF(A2="", "NO", "YES")
Select B2:B100 or however far down you want.
On the Home tab of the ribbon, click Conditional Formatting > New Rule...
Select 'Format only cells that contain'.
Leave the first drop down set to 'Cell Value'.
Select 'equal to' from the second drop down.
In the box next to it, enter the formula="NO"
Click Format...
Activate the Font tab.
Select Bold
Activate the Fill tab.
Select red as highlight color.
Click OK, then click OK again.Repeat these steps, but with
="YES"
and green as fill color.