Nested If Statements

Polishkitty

New Member
Joined
Jan 16, 2014
Messages
1
Hi,

I have an Excel worksheet that has one column (e.g. B2) that contains the date. I also have 12 columns to the right that show January (Q4), Februrary(P4), etc. Under those dates there are numbers fo reach month (Q5 has January value, P5 has February value).

What I am trying to do is this: Based on the month in B2 or current month, I want to be able to compare the current month value (P5) to last month's value (Q5) and show an arrow in another cell that displays to the the right if values are the same , down if current month is lower than previous month and up arrow if current month is higher that previous month.

Now I was able to get the formula to work for February so that it compares february (current month) to January (previous month) and returns an arrow. What I need is a way to have this formula compare the next month and previous month when cell B2 is the new month, e.g. March. So if I type 3/1/14 in B2, the formula would know to compare S5 (March value) to R5 (February value) and provide the correct arrow. Here is the formula for one month: =IF($B$2=$Q$4,IF(Q7=P7,RIGHTARROW,IF(Q7<P7,DOWNARROW,UPARROW))).

Thanks.
Polishkitty
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Hi Polishkitty - I think your formula was cut off when you pasted it in. You might try reposting with the complete formula and an example of your data. That may make it easier to understand what you need. Hope this helps.
 
Upvote 0

Forum statistics

Threads
1,216,110
Messages
6,128,894
Members
449,477
Latest member
panjongshing

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