Multiple If depending on date

kenpcli

Board Regular
Joined
Oct 24, 2017
Messages
129
How do i get a cell to look at a cell and depending on the date divide another cell by a certain number?

for example:

In cell H44 I want it to look at H6 and if that date is within the dates of the first quarter then divide whats in H35 by 520, if the dates are with second quarter it divided by 1040 and so forth.

Thank you
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
How about
=H35/(ROUNDUP(MONTH(H6)/3,0)*520)
 
Upvote 0
It already does that, as does Eric's :)
 
Upvote 0
Both of our formulas figure out what quarter it is, based on the month of the date in H6. Months 1,2,3 --> quarter 1, months 4,5,6 --> quarter 2, etc. Then we take the quarter number and multiply by 520, which give 520, or 1040, or 1560, or 2080. So we don't really need an IF in this case.
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,170
Members
453,021
Latest member
Justyna P

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