List alpha numeric numbers between two references

sedwardson

New Member
Joined
Mar 2, 2023
Messages
35
Office Version
  1. 365
Platform
  1. Windows
I found this by Snakehips and it was VERY helpful ! I tried to modify it but found that it only works with numeric entries and not alpha numeric entries.

Rich (BB code):
VBA Code:
Sub Fill()    [A4] = [A1].Value
    ato = [B1].Value
    [B4] = [A2].Value
    bto = [B2].Value
    [C4] = [A3].Value
    cto = [B3].Value
    [A4].DataSeries Rowcol:=xlColumns, Type:=xlLinear, Step:=1, Stop:=ato
    [B4].DataSeries Rowcol:=xlColumns, Type:=xlLinear, Step:=1, Stop:=bto
[C4].DataSeries Rowcol:=xlColumns, Type:=xlLinear, Step:=1, Stop:=cto
End Sub

The code I wrote (but failed to get to work) was:

VBA Code:
Sub Fill()    
    [B3] = [B4].Value
    bto = [C3].Value
    [B4].DataSeries Rowcol:=xlColumns, Type:=xlLinear, Step:=1, Stop:=bto
End Sub


This works with numbers but not for the range I have which is: 531PZ228173 - 531PZ228222

Can anyone help with how I might get the range to work with this cell entry. Thanks.
P.S. Sorry if I've missed some detail out or you require more from me. This is my first post ! Please bear with me :-)
 
have you tried the code on post #17
I'm trying it but nothing appears to be happening. I'm trying to understand the code to see if I have to enter any details myself to make it work? Do I need to give it a starting cell? or both a starting number and ending number? Sorry to be a pain .
 
Upvote 0

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Thanks for the spreadsheet ! Makes total sense now ! I've run it with ALL of my ranges and upon first inspection it all looks good ! Thank you for your help and patience ! :biggrin:
 
Upvote 0
Please modify this line like this to make sure it is incrementing:
VBA Code:
.AutoFill Destination:=.Resize(r + 1), Type:=xlFillSeries
 
Upvote 0

Forum statistics

Threads
1,223,275
Messages
6,171,121
Members
452,381
Latest member
Nova88

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