Macro recording, selecting rolls based on found data


Posted by Dan on May 01, 2000 10:24 AM

I have many many route sheets to edit. The problem is that the sheets are not standard even though they contain the same information. I want to insert a row below a certain value but that value is present on different rows on different worksheets. It may be on row 26 on one and 28 on the next. I have tried to record a macro that finds that value and then on the next row inserts a line but it assigns that row # to the macro. Example: finds value on row 25, the next line reads something similar to...

Rows("26:26").Select
Selection.Insert Shift:=xlDown

Any thoughts? I hope I've made things clear. If not I'll amend additional info.

Thanks,
Daniel


Posted by Celia on May 01, 2000 4:31 PM


Daniel
Assuming that your macro can locate and select the value regardless of what row it is on (if not, please advise), then instead of "Rows("26:26").Select" use the following code :-

Selection.Offset(1,0).EntireRow.Insert

Celia




Posted by Daniel on May 02, 2000 11:26 AM

Thanks Celia!!!

Daniel