Ranges

meganm111

New Member
Joined
Feb 15, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi,

I'm looking to fill the numbers in these ranges. For example, I would want 350 in E2, 351, in F2, and 352 in G2. The next row would be 354 in E3, 355 in F3 and so on all the way to 359. I have 10K+ rows like this. As you can see, each range may be a different size. Let me know if you need additional info. Thank you
 

Attachments

  • Excel Example.JPG
    Excel Example.JPG
    23.9 KB · Views: 10

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
If all values in Column D are as what's in the picture try this"

Book2
EFG
2350351352
Sheet2
Cell Formulas
RangeFormula
E2E2=LEFT(D2,3)
F2F2=IF(LEN(D2)>3,E2+1,"")
G2G2=IF(LEN(D2)>3,E2+2,"")


drag formula down
 
Upvote 0
If all values in Column D are as what's in the picture try this"

Book2
EFG
2350351352
Sheet2
Cell Formulas
RangeFormula
E2E2=LEFT(D2,3)
F2F2=IF(LEN(D2)>3,E2+1,"")
G2G2=IF(LEN(D2)>3,E2+2,"")


drag formula down
Thank you that gets me closer, but the next row is a range from 354-359. If I drag down the formula, I believe your solution would only work on ranges that are of the same length.
 
Upvote 0
Welcome to the MrExcel board!

Try this copied down column E

21 02 16.xlsm
DEFGHIJK
1
2350-352350351352
3354-359354355356357358359
4360-361360361
5362362
6363363
7364-366364365366
8367367
Ranges
Cell Formulas
RangeFormula
E2:G2,E7:G7,E5:E6,E8,E4:F4,E3:J3E2=IFERROR(SEQUENCE(,-MID(D2,FIND("-",D2),20)-LEFT(D2,FIND("-",D2)-1)+1,LEFT(D2,FIND("-",D2)-1)),D2)
Dynamic array formulas.
 
Upvote 0
Solution
Not sure how many columns you will end up using but here I have up to column L:

Cell Formulas
RangeFormula
E2:E8E2=IFERROR(VALUE(LEFT(D2,3)),"")
F2:F8F2=IFERROR(IF(VALUE(LEFT(D3,3))<=E2+1,"",E2+1),"")
G2:G8G2=IFERROR(IF(VALUE(LEFT(D3,3))<=E2+2,"",E2+2),"")
H2:H8H2=IFERROR(IF(VALUE(LEFT(D3,3))<=E2+3,"",E2+3),"")
I2:I8I2=IFERROR(IF(VALUE(LEFT(D3,3))<=E2+4,"",E2+4),"")
J2:J8J2=IFERROR(IF(VALUE(LEFT(D3,3))<=E2+5,"",E2+5),"")
K2:K8K2=IFERROR(IF(VALUE(LEFT(D3,3))<=E2+6,"",E2+6),"")
L2:L8L2=IFERROR(IF(VALUE(LEFT(D3,3))<=E2+7,"",E2+7),"")


but for each column over just add 1 number or if you like use a helper column and drag down
 
Upvote 0
If you are using Excel365 take a look at the SEQUENCE function.
 
Upvote 0

Forum statistics

Threads
1,215,622
Messages
6,125,886
Members
449,269
Latest member
GBCOACW

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