ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Inserting and Tracking Missing Sequence (https://www.excelbanter.com/excel-discussion-misc-queries/44863-inserting-tracking-missing-sequence.html)

matt

Inserting and Tracking Missing Sequence
 
I have some data which follows this pattern

1-p 1 3
3-e 3 3
4-d 4 2
6-f 4

I need a macro that will recognize that numbers 2 and 5 is missing, insert
blank rows in their positions, as well as the appropriate value from a list
(say, "2-g" and "5-c"), and then create a list on the same spreadhseet of
each value which is inserted. furthermore, it needs to recognize whether the
values are absent for both columns or only for one. If that isn't complicated
enough, there are some rows which will always be missing ("2-g" in this
example), and while I need them to be inserted, I don't want them to be
listed as missing. After running the macro, it should look like this

1-p 1 3 missing clones 1: 5, 6
2-g 2 7 missing clones 2: 5
3-e 3 3
4-d 4 2
5-c
6-f 4

Any help would be greatly appreciated.
- matt

D Hilberg

That's not a question, that's a custom programming job :)

- DH


D Hilberg

To be more helpful:

You can get started in learning VBA for Excel by recording several
small macros that do a part of what you need, such as inserting a row
or putting a value in a cell. Then observe the visual basic syntax that
was automatically generated. If you already know a programming language
(loops, if-then-else, etc), then you can teach yourself VBA from a
book.

It's a start --

DH



All times are GMT +1. The time now is 10:38 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com