Find lastest date in row and detail which quarter it falls in

Godders199

Active Member
Joined
Mar 2, 2017
Messages
313
Office Version
  1. 2013
Hello, I am building a new spreadsheet and need to find the last date in a row and evidence which Quarter it falls in as per this example below.

date 1date 2date3Quarter
01/01/201801/06/201801/03/2018Q2
01/03/201801/04/201801/07/2018Q3
<colgroup><col width="75" style="width: 56pt; mso-width-source: userset; mso-width-alt: 2742;" span="3"> <col width="64" style="width: 48pt;"> <tbody> </tbody>

I now using =max(a1:a3) will give me th latest date ,but i dont know how to convert that to a quarter.

Also i am looking to convert his to vba, as i am trying to avoid any formulas in worksheet, to keep it functioning efficiently.

Hope someone can hel.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
The formula would be:
PHP:
="Q"&ROUNDUP(MONTH(MAX(A2:C2))/3,0)
The VBA would be:
Code:
Range("D2").FormulaR1C1 = "=""Q""&ROUNDUP(MONTH(MAX(RC[-3]:RC[-1]))/3,0)"
 
Upvote 0
Thanks for the formula.

Would that VBA just put the formula in cell d2?which i trying to avoid ,just really want to see the result. Iwill give it ago and see what impact it has on the workbook.
 
Upvote 0
Code:
    With Range("D2")
        .FormulaR1C1 = "=""Q""&ROUNDUP(MONTH(MAX(RC[-3]:RC[-1]))/3,0)"
        .Formula = .Value
    End With
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,427
Members
448,961
Latest member
nzskater

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