ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   inserting columns within certain rows only (https://www.excelbanter.com/excel-discussion-misc-queries/35322-inserting-columns-within-certain-rows-only.html)

crimsonkng

inserting columns within certain rows only
 
I'm afraid that I know the answer to this but I thought I'd ask anyway ...

Is it possible to insert columns for only a certain section of the
spreadsheet, i.e., to affect only a certain range of rows?

Over the years, I've created a spreadsheet with about 300 rows (and with a
6,000-line macro) and now realize that I need about 10 extra columns ... but
only in a certain part of the spreadsheet (rows 100 to 150).

If I insert columns, the ENTIRE spreadsheet (from row 1 to 65536) is going
to be affected (and all of the address references in my macro will have to be
redefined) and then I'll have to cut-and-paste all of the fields from rows 1
to 99 and 151 to 300 back over to their original columns and then all my
row/column references are going to get screwed up and it's going to become a
major hassle.

So, I thought that there might be a trick to inserting columns in specific
rows without affecting any of the other rows. (Wishful thinking, I know.)

Thanks. Dan

Don Guillett

One way is to hightlight the cells you want to move PLUS the columns you
need to insert for those rows. Then right click and select insert and select
shift cells right. This will leave space for you new data in the resulting
blank columns. This probably won't show as done but rows 4-6 columns are
moved to the right.

1 2 3
1 2 3
1 2 3
1 2 3
1 2 3
1 2 3
1 2 3
1 2 3
1 2 3
1 2 3

--
Don Guillett
SalesAid Software

"crimsonkng" wrote in message
...
I'm afraid that I know the answer to this but I thought I'd ask anyway ...

Is it possible to insert columns for only a certain section of the
spreadsheet, i.e., to affect only a certain range of rows?

Over the years, I've created a spreadsheet with about 300 rows (and with a
6,000-line macro) and now realize that I need about 10 extra columns ...

but
only in a certain part of the spreadsheet (rows 100 to 150).

If I insert columns, the ENTIRE spreadsheet (from row 1 to 65536) is going
to be affected (and all of the address references in my macro will have to

be
redefined) and then I'll have to cut-and-paste all of the fields from rows

1
to 99 and 151 to 300 back over to their original columns and then all my
row/column references are going to get screwed up and it's going to become

a
major hassle.

So, I thought that there might be a trick to inserting columns in specific
rows without affecting any of the other rows. (Wishful thinking, I know.)

Thanks. Dan




JE McGimpsey

You're correct.

Could you use a second worksheet for that section?


In article ,
"crimsonkng" wrote:

I'm afraid that I know the answer to this but I thought I'd ask anyway ...

Is it possible to insert columns for only a certain section of the
spreadsheet, i.e., to affect only a certain range of rows?

Over the years, I've created a spreadsheet with about 300 rows (and with a
6,000-line macro) and now realize that I need about 10 extra columns ... but
only in a certain part of the spreadsheet (rows 100 to 150).

If I insert columns, the ENTIRE spreadsheet (from row 1 to 65536) is going
to be affected (and all of the address references in my macro will have to be
redefined) and then I'll have to cut-and-paste all of the fields from rows 1
to 99 and 151 to 300 back over to their original columns and then all my
row/column references are going to get screwed up and it's going to become a
major hassle.

So, I thought that there might be a trick to inserting columns in specific
rows without affecting any of the other rows. (Wishful thinking, I know.)


bj

you can insert cells for a given distance.
foe example highlight C100:L150 and insert cells select shift right

will give you 10 effective new columns between 100 and 150

This may not do what you want, if not give more detail

"crimsonkng" wrote:

I'm afraid that I know the answer to this but I thought I'd ask anyway ...

Is it possible to insert columns for only a certain section of the
spreadsheet, i.e., to affect only a certain range of rows?

Over the years, I've created a spreadsheet with about 300 rows (and with a
6,000-line macro) and now realize that I need about 10 extra columns ... but
only in a certain part of the spreadsheet (rows 100 to 150).

If I insert columns, the ENTIRE spreadsheet (from row 1 to 65536) is going
to be affected (and all of the address references in my macro will have to be
redefined) and then I'll have to cut-and-paste all of the fields from rows 1
to 99 and 151 to 300 back over to their original columns and then all my
row/column references are going to get screwed up and it's going to become a
major hassle.

So, I thought that there might be a trick to inserting columns in specific
rows without affecting any of the other rows. (Wishful thinking, I know.)

Thanks. Dan


crimsonkng

Shame on me for not knowing that, Don and BJ. I'm not sure if it will work
exactly like I want it to but it seems to hold promise. I'm gonna play
around with it. I think it'll come very close. (And thanks to you, too, JEM
.... I considered that, too.)

Appreciate it ... Dan

"crimsonkng" wrote:

I'm afraid that I know the answer to this but I thought I'd ask anyway ...

Is it possible to insert columns for only a certain section of the
spreadsheet, i.e., to affect only a certain range of rows?

Over the years, I've created a spreadsheet with about 300 rows (and with a
6,000-line macro) and now realize that I need about 10 extra columns ... but
only in a certain part of the spreadsheet (rows 100 to 150).

If I insert columns, the ENTIRE spreadsheet (from row 1 to 65536) is going
to be affected (and all of the address references in my macro will have to be
redefined) and then I'll have to cut-and-paste all of the fields from rows 1
to 99 and 151 to 300 back over to their original columns and then all my
row/column references are going to get screwed up and it's going to become a
major hassle.

So, I thought that there might be a trick to inserting columns in specific
rows without affecting any of the other rows. (Wishful thinking, I know.)

Thanks. Dan



All times are GMT +1. The time now is 02:25 PM.

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