Replace cells if there is data to the right

BMR

New Member
Joined
Jul 19, 2011
Messages
21
I have a spreadsheet of about 4000 rows. I have shipping box dimensions in 5 columns per box (L x W x H x Weight x Freight Class), with a total of 8 potential boxes. Columns AR - CE (40 columns) are split into the 8 groups.

Box 1 :AR - AV
Box 2: AW - BA
Box 3: BB - BF
..... and so on.

For some reason, if a row has multiple boxes (has data directly right of AV), the dimensions in AR-AV are just the sum of all other boxes. If there are multiple boxes, I need to move all data within AW-CE to the right 5 spaces.

104ly5e.jpg


For row 14 (and any others like it in the rest of the data sheet) I would want columns AW (The start of carton 2) through CE (the end of carton 8) to be moved over 5 columns, thus replacing carton 1 with carton 2, carton 2 with carton 3, etc.

Basically if there is data in AW, move columns AW-CE over 5 rows (*or 6 if you have to insert a columns to do a RIGHT formula)
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Forum statistics

Threads
1,224,527
Messages
6,179,328
Members
452,907
Latest member
Roland Deschain

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