• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Excel Formula to present Sequence by taking values from cells

I have tried at my end to make such a formula which fulfill the data Quarterly as Q12020, Q22020 after that then H22020, H12021, H22021 and so on. But i could not done this then posted here to get the help.

Actually the thing i have been trying to get by formula is that
If cell "H2" has Q12020 this quarter
then "M2" (has a formula) that should be started from Q12020 this
and "M3" would be Q22020


"M2" and "M3" will always have quarter (that could be Q12020, Q22020, Q32020, Q42020 according to years)


and "M4" would be H22020
then
"M5" would be H12021
then
"M6" = H22021
"M7" = H12022
"M8" = H22022

and so on.


First 6 months will be consider as H1
Last six months will be consider as H2


If i change the Q12020 to Q32020 in cell "H2" then "M2" = Q32020 and "M3" = Q42020
then
and "M4" would be H12021
then
"M5" would be H22021
and so on

I would be glad if someone can help me with this.
 

Attachments

  • Book1.xlsx
    10.5 KB · Views: 5
Hi Sir,

I also need some addition in formula if you can help me out further with this that,

If I select Q42020 then first cell should show
Q42020
Q12021
Q22021
Then
H22021
H12022
H22022
and so on


Same if i select
Q22020
Then formula first cell will be
Q22020
Q32020
Q42020
Then
H12021
H22021
and so on

Rest will be same as already available in formula.

If I select Q12020 or Q32020
Then first 2 cell will be quarter then half.
 
Please try at M2
=IF(ROWS(M$2:M3)=1,H$2,IF(ROWS(M$2:M3)>2,IF(OR(LEFT(M2,2)={"Q2","H1"}),"H2-"&RIGHT(M2,4),IF(OR(LEFT(M2,2)={"Q4","H2"}),"H1-"&RIGHT(M2,4)+1,"Q"&MOD(MID(M2,2,1),4)+1&RIGHT(M2,4)+INT(MID(M2,2,1)/4))),"Q"&MOD(MID(M2,2,1),4)+1&RIGHT(M2,4)+INT(MID(M2,2,1)/4)))
 

Attachments

  • Book1.xlsx
    12.9 KB · Views: 4
Back
Top