• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA Macro for copying multiple column in one column with condition

Nishant859_1

New Member
Good Evening Experts,

Hope you all are doing well & safe !

Looking help with VBA code to copying multiple column in one column
but there is condition i.e. Column 1 & Column 2 required in repetition & also required header
for detail understanding i am attaching workbook, Raw Tab contain Data, & Output is the tab which is required thru Code
Output tab in attached file is linked with Raw data just to better understanding, but actually data not required to Links.

Small Example
Raw Data

CentreFunctionHeader 1Header 2Header 3
APPRO
100​
244​
30​
EMSAA
112.3​
33.7​
NAMFAC
126.1​

OUTPUT is
CentreFunctionHeaderAmount
APPROHeader 1 100.00
EMSAAHeader 1 112.30
NAMFACHeader 1 126.10
APPROHeader 2 244.00
EMSAAHeader 2 -
NAMFACHeader 2 -
APPROHeader 3 30.00
EMSAAHeader 3 33.70
NAMFACHeader 3 -
 

Attachments

Nishant859_1

New Member
Thanks a Lot
Nishant859_1
Select Output-sheet to get results.
I left You data there too.
Was there any reason - why Header 20 was twice?
... I skipped that.
Thanks a Lot Ninja, Need Header 20 one time only
can we link VBA code macro button in a separate sheet
when we click button code will create a new sheet with output data
 

vletm

Excel Ninja
Nishant859_1
About 20 ... wonder was ... why?
About linking ... It won't give expected result - it uses fixed sheet-name.
About clicking ... where is that a separate sheet?
>> Now, You could test this way
... copy ( = duplicate ) Your Output-sheet manually as many times as need
... always then You'll activate Your sheet - it'll refresh its output - if You'll confirm it.
... The file updated

Nishant859_1
Seems You've forgotten/skipped few basic steps ... based #5 reply
- take care.
 

Attachments

Last edited:

Marc L

Excel Ninja
Looking help with VBA code to copying multiple column in one column
Why don't you use a pivot table ?​
And far above all, why did you open the same thread on another forum ?‼​
A must read :​
 
Top