Excel - List out all the numbers within a given range

klitton7

New Member
Joined
Jul 24, 2024
Messages
24
Office Version
  1. 2019
Platform
  1. Windows
I need a way to list all the numbers between each range of numbers in columns H and I.
It would also be great to have the associated information in the other columns appear with each entry (or at least column D)

Thank you!
 

Attachments

  • Screenshot 2024-12-19 145651.png
    Screenshot 2024-12-19 145651.png
    61.5 KB · Views: 21

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Could you post a copy of your workbook (don't include confidential data) to a cloud site then provide the download link here ?
 
Upvote 0
Also there are two easy methods to accomplish your goal.

#1: You could sort Col H ascending and when asked "Expand the selection" click OK.

#2: You can create a FILTER ascending with expand the selection.
 
Upvote 0
Additionally, in power query, you do a list between for each record. But we will need to see a file and not a picture as we cannot manipulate data in a picture.
 
Upvote 0
With Power Query

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table_Query_from_MAGNOLIA4789"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"sStmt_cd", type text}, {"sFormat_cd", Int64.Type}, {"iGroup", Int64.Type}, {"Column1", type text}, {"Column2", type text}, {"Column3", type text}, {"iLine", Int64.Type}, {"sFromAcct_cd", Int64.Type}, {"sThruAcct_cd", Int64.Type}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each {[sFromAcct_cd]..[sThruAcct_cd]}),
    #"Expanded Custom" = Table.ExpandListColumn(#"Added Custom", "Custom")
in
    #"Expanded Custom"

here is your file with the update
 
Upvote 0
Solution
With Power Query

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table_Query_from_MAGNOLIA4789"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"sStmt_cd", type text}, {"sFormat_cd", Int64.Type}, {"iGroup", Int64.Type}, {"Column1", type text}, {"Column2", type text}, {"Column3", type text}, {"iLine", Int64.Type}, {"sFromAcct_cd", Int64.Type}, {"sThruAcct_cd", Int64.Type}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each {[sFromAcct_cd]..[sThruAcct_cd]}),
    #"Expanded Custom" = Table.ExpandListColumn(#"Added Custom", "Custom")
in
    #"Expanded Custom"

here is your file with the update
That looks great - I'm not familiar with power query - I'll have to check it out.
Would you mind applying it to tabs named 11 & 12 as well?
 
Upvote 0
While I am working on 11 and 12, here are some links you will find helpful.

Power Query is a free AddIn for Excel 2010 and 2013, and is built-in functionality from Excel 2016 onwards (where it is referred to as "Get & Transform Data").

It is a powerful yet simple way of getting, changing and using data from a broad variety of sources, creating steps which may be easily repeated and refreshed. I strongly recommend learning how to use Power Query - it's among the most powerful functionalities of Excel.

- Follow this link to learn how to install Power Query in Excel 2010 / 2013.

- Follow this link for an introduction to Power Query functionality.

- Follow this link for a video which demonstrates how to use Power Query code provided.
 
Upvote 0

Forum statistics

Threads
1,224,829
Messages
6,181,222
Members
453,024
Latest member
Wingit77

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