Auto sequential output in Ascending or Descending order

bramacharya

New Member
Joined
May 9, 2021
Messages
5
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi All,

Let say if got 4 cells A, B, C and D.

when there is input like any numbers or alphabets, i should able to get out based on below conditions in Ascending or Descending order.

A EQUAL OR LESS THAN B
B EQUAL OR GREATHER THAN A BUT EQUAL OR LESS THAN C
C EQUAL OR GREATHER THAN B BUT EQUAL OR LESS THAN D
D EQUAL OR GREATHER THAN C


I dont know whether must use vbd code or formula to get this outputs and no dont know the right keywords to search in google.

I've attched the excel image for your better understanding.

Please help me. Thank You.
 

Attachments

  • Questions.JPG
    Questions.JPG
    114.8 KB · Views: 12

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
you can try if you have office 365 apply as per your logic.


=SORTBY(G9:G13,H9:H13,1)



NameQtyResult
a
5​
e
b
10​
a
c
7​
c
d
25​
b
e
3​
d
 
Upvote 0
Is this what you are looking for?

Book2
ABCDEFGHIJ
1
2ABCDABCD
32589ABCE
4
50258AABC
61369BBCD
7247CDE
8358EF
9469G
1057H
118I
12J
13K
14L
15M
16N
17O
18P
19Q
20R
21S
22T
23U
24V
25W
26X
27Y
28Z
Sheet1
Cell Formulas
RangeFormula
B5:B10,E5:E6,D5:D9,C5:C11B5=SEQUENCE(IF(ISBLANK(C3),9,C3)-A3+1,,A3)
G5:G6,J5:J28,I5:I8,H5:H7G5=CHAR(SEQUENCE(IF(ISBLANK(H3),90,CODE(H3))-IF(ISBLANK(F3),65,CODE(F3))+1,,IF(ISBLANK(F3),65,CODE(F3))))
Dynamic array formulas.
 
Upvote 0
Solution
You Are Great.

This is what I'm looking for.. ?????

Marvelous.

Thank You So Much. ????
 
Upvote 0
=SEQUENCE(IF(ISBLANK(C3),9,C3)-A3+1,,A3)

Hi Habtest,

I've try above formula in Office 365 and its working fine.

But not in Ms Office 2019.May I know why ?

1620655753190.png
 
Upvote 0
Dynamic array or SEQUENCE() function is not available before O365. Here is a solution for O2019, a lot clunkier and you need to manually drag the formula down to a certain range.
Cell Formulas
RangeFormula
B5:E15B5=IF(B4<IF(ISBLANK(C$3),9,C$3),A$3+COUNT(B$4:B4),"")
G5:J28G5=IF(OR(ISNUMBER(MATCH(H$3,G$4:G4,0)),ISNUMBER(MATCH("Z",G$4:G4,0))),"",CHAR(IFERROR(CODE(F$3),CODE(G$3))+COUNTA(G$4:G4)))
 
Upvote 0
Dear Habtest,

Good Day To You.

I need your help again.

How to get output like below example?

Thank You.

Example1.JPG
 
Upvote 0

Forum statistics

Threads
1,214,994
Messages
6,122,633
Members
449,092
Latest member
bsb1122

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