0

For automation purposes, I want to reflect the cells from right side to left side from the active cell.

Example: In H2 cell ={"A","B","C"}. This result will spill in H2, I2, J2 cells like (A, B, C) .

I am looking for the solution would be in cells F2, G2, H2, i.e. (C, B, A) from H2 cell.

How can I do this with Excel formulas?

3
  • 2
    Not possible via formula. You need VBA. Commented Oct 26 at 8:34
  • 2
    You cannot have both your source and your results in the same cell, so no, you cannot do this with formulas. Commented Oct 26 at 8:45
  • I believe this always works from left to work, not the other way around. Why do you want to do this? (Maybe this is an XY-problem.) Commented Oct 31 at 8:03

1 Answer 1

0

It is not possible to get result in the same row, but if we place the result in row 3, for example, then in A3 we can put the following formula:
=LET(wd,COLUMNS(A:H),SORTBY(EXPAND($H$2#,,wd,""),SEQUENCE(,wd),-1))
Alternatively, if you do not place the constant {"A","B","C"} in a worksheet cell, but directly in the formula, then the result can be in any row.
=LET(wd,COLUMNS(A:H),SORTBY(EXPAND({"A","B","C"},,wd,""),SEQUENCE(,wd),-1))

Sign up to request clarification or add additional context in comments.

4 Comments

OP wants to put formula in H2 cell then spill the result to left direction H2-->G2-->F2.
Spilling to the left is not possible unless we change the way the sheet is displayed to right to left, but it will still be columns H, I, J, not H, G, F.
Yes, so not possible.
Agreed, I just think that if the solution conceived by the OP is not possible, then it is worth giving a similar solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.