Bring value (variable position) from rows to column

Dampa88

Board Regular
Joined
Apr 28, 2016
Messages
53
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I'm stacked with a formula in Excel or a way to get things sorted.

Basically, I have some rows that need to be moved into columns an repeated x-times.

ex3Yd3u.png


Do you have any idea how can I obtain this?

Thanks for your help.

Daniele
 
Hi Joe,

It worked as expected! I really thank you for the help.

I couldn't imagine that it was possible to obtain that result with just few lines of code, I still need to learn a lot of VBA :rolleyes:

Thanks again!

Daniele
 
Upvote 0

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
You are welcome!

Yes, I just programmed it to do the following:
- Insert a blank column at column A
- Loop through all the rows from the data; if column C equals "Zone", capture the zone value and delete the row, otherwise, place the last captured "Zone" value in column A

So, once you identify the pattern, you can come up with the methodology and code to do it.

There are probably other ways to do it, maybe even some more efficient that don't use loops (there often are many ways to accomplish the same task). But this one seems to work!
 
Upvote 0
Hi Joe,

Thanks for the explanation.
I can confirm you that it works very well without slowing down the execution of the whole macro.

KR,
Daniele
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

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