Excel Smart Sequential Fill

  • Thread starter Thread starter rjb
  • Start date Start date
R

rjb

Hi,

I need to fill down cells that have numbers inside of text.
Is it possible to write a macro that would automatically sequence these
numbers?

ABCD 1 EFGH
ABCD 2 EFGH
ABCD 3 EFGH
ABCD 4 EFGH
ABCD 5 EFGH
ABCD 6 EFGH

Thanks!
 
Hi rjb

Sub Test()
Range("A1:A100").FormulaR1C1 = "=""ABCD "" & ROW() & "" EFGH"""
Range("A1:A100").Formula = Range("A1:A100").Value
End Sub

--
XL2002
Regards

William

(e-mail address removed)

| Hi,
|
| I need to fill down cells that have numbers inside of text.
| Is it possible to write a macro that would automatically sequence these
| numbers?
|
| ABCD 1 EFGH
| ABCD 2 EFGH
| ABCD 3 EFGH
| ABCD 4 EFGH
| ABCD 5 EFGH
| ABCD 6 EFGH
|
| Thanks!
|
|
 
rjb,

You might also look at custom formats. First create your sequence of
numbers.. Then format the cells with the sequence by choosing Format->Cells
then the Number tab. Then choose Custom and enter:

"ABCD" General "EFGH"

hth,

Doug Glancy
 
I guess I am looking for a macro that will take any string in the first
selected cell, find the number anywhere in the string and auto-increment it
in all the other selected cells.

String num String
|
V
String num+1 String
String num+2 String
String num+3 String
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top