Can you separate a series of numbers by even and odd

Eskonn

New Member
Joined
Mar 28, 2018
Messages
26
Office Version
  1. 365
Platform
  1. Windows
I have a large series of numbers that I need separated by even and odd numbers.
Here is what the numbers look like. I have made the odd numbers red on the list below and the even numbers are black

19-11-1
19-11-2
19-11-3
19-11-4
19-12-1
19-12-2
19-12-3
19-12-4
19-13-1
19-13-2
19-13-3
19-13-4
19-14-1
19-14-2
19-14-3
19-14-4

<colgroup><col width="64" style="width:48pt"> </colgroup><tbody>
</tbody>

The digit that determines if it is even or odd is the fourth number 19-14-1
When separating these I would like to separate the whole row.

Any suggestions would be great.
Thanks
 
Thank you helping with this problem.
I was able to get the A21 & J21 formulas to work.
The B21 & K21 are returning #N/A, I am trying to work through it to see what the error is.

Thanks for your time

Here is a formula way.
The formula for the Row # (cells A21 and J21) are array formula and must be entered with CTRL-SHIFT-ENTER then drag down as needed.
Formulas in B21 and J21 just copy down and across.Change ranges to match your data. They can be put on separate worksheets.


ABCDEFGHIJKLMNOPQ
1MaterialSizeVTStorLocationQtyunit
27317515750VT40019-11-15CS
35986815750VT40019-11-28CS
42836015750VT40019-11-39CS
565487157501240019-11-48CS
6158971411240019-12-15CS
711134101.75640019-12-23CS
83959157501240019-12-39CS
971173263751240019-12-49CS
105553015750VT40019-13-15CS
116250815750VT40019-13-24CS
127035101.75640019-13-37CS
136738157501240019-13-47CS
142627101.75640019-14-15CS
1521971157501240019-14-24CS
1610050648750VT40019-14-37CS
17100017963VT40019-14-44CS
18
19Even #'s ODD #'s
20Row #MaterialSizeVTStorLocationQtyunit Row #MaterialSizeVTStorLocationQtyunit
215158971411240019-12-15CS 17317515750VT40019-11-15CS
22611134101.75640019-12-23CS 25986815750VT40019-11-28CS
2373959157501240019-12-39CS 32836015750VT40019-11-39CS
24871173263751240019-12-49CS 465487157501240019-11-48CS
25132627101.75640019-14-15CS 95553015750VT40019-13-15CS
261421971157501240019-14-24CS 106250815750VT40019-13-24CS
271510050648750VT40019-14-37CS 117035101.75640019-13-37CS
2816100017963VT40019-14-44CS 126738157501240019-13-47CS
29

<colgroup><col style="width:30px; "><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:27px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
A21{=IFERROR(SMALL(IF(ISEVEN(MID($E$2:$E$17,5,1)),ROW($E$2:$E$17)-ROW($E$2)+1),ROWS($A$21:$A21)),"")}
B21=IF(A21="","",INDEX($A$2:$G$17,$A21,MATCH(B$20,$A$1:$G$1,0)))
J21{=IFERROR(SMALL(IF(ISODD(MID($E$2:$E$17,5,1)),ROW($E$2:$E$17)-ROW($E$2)+1),ROWS($J$3:J3)),"")}
K21=IF(J21="","",INDEX($A$2:$G$17,$J21,MATCH(A$1,$K$20:$Q$20,0)))

<tbody>
</tbody>
Formula Array:
Produce enclosing
{ } by entering
formula with CTRL+SHIFT+ENTER!

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 
Upvote 0

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
@Caleeco
Thanks much for the correction. That's what happens when you don't test your code. I was in a hurry to run some errands. :)
 
Upvote 0
OK, see if this helps.
Sheet1 has the data.
Sheet2 is even data.
Sheet3 is odd data.

Excel Workbook
ABCDEFG
1MaterialSizeVTStorLocationQtyunit
27317515750VT40019-11-15CS
35986815750VT40019-11-28CS
42836015750VT40019-11-39CS
565487157501240019-11-48CS
6158971411240019-12-15CS
711134101.75640019-12-23CS
83959157501240019-12-39CS
971173263751240019-12-49CS
105553015750VT40019-13-15CS
116250815750VT40019-13-24CS
127035101.75640019-13-37CS
136738157501240019-13-47CS
142627101.75640019-14-15CS
1521971157501240019-14-24CS
1610050648750VT40019-14-37CS
17100017963VT40019-14-44CS
Sheet1 - This is the data


Excel Workbook
ABCDEFGH
1Row #MaterialSizeVTStorLocationQtyunit
25158971411240019-12-15CS
3611134101.75640019-12-23CS
473959157501240019-12-39CS
5871173263751240019-12-49CS
6132627101.75640019-14-15CS
71421971157501240019-14-24CS
81510050648750VT40019-14-37CS
916100017963VT40019-14-44CS
Sheet2 - Even data


Excel Workbook
ABCDEFGH
1Row #MaterialSizeVTStorLocationQtyunit
217317515750VT40019-11-15CS
325986815750VT40019-11-28CS
432836015750VT40019-11-39CS
5465487157501240019-11-48CS
695553015750VT40019-13-15CS
7106250815750VT40019-13-24CS
8117035101.75640019-13-37CS
9126738157501240019-13-47CS
Sheet3 - Odd data
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,718
Members
448,986
Latest member
andreguerra

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