Paste x Times with Multiple Conditions

Closed
anshul1233 - Sep 28, 2017 at 09:09 PM
 anshul1233 - Oct 1, 2017 at 08:12 PM
Hello,

I have no real knowledge of macro, but I think macro has a solution to my question


I have data in Sheet1 and would like output in Sheet2


Sheet1
- Can have n number of Rows and columns
- Column A needs to repeat as may times as values in Column B (output in Sheet2)
- Column C, D, F, G .... so on has numeric values that also need to be matched with A output in Sheet2 (best explained with example below)

E.g.

Sheet1 Data (input)
A1 (Mark) B1 (2) C1 (4) D1 (6)
A2 (Dan) B2(4) C2 (67) D2 (98) E2(78) F2(870)


Sheet2 (desired output)
A B
Mark 4
Mark 6
Dan 67
Dan 98
Dan 78
Dan 870



2 responses

Blocked Profile
Sep 29, 2017 at 07:00 PM
Ok, record that magical MACRO. Then take a look at what you recorded. Start with that!
0
Just to add further clarity on requirements:

I have data in Sheet1 and would like output in Sheet2


Sheet1 (input data)
- Column A – Text Only
- Column B onwards – Numeric only
- Input can have unknown number of Rows and columns. However, column B will determine number of columns for the particular row (e.g if B2 says 4, then row2 will have values from A2 to F2, if B2 say 6, then row 6 will have values from A6 to H6)
- Data in A1 (sheet1) needs to repeat as many times as value in B1 (sheet1) (output should be in Sheet2).
- Column C, D, F, G .... so on has numeric values that also need to be matched with Column A output in Sheet2 (best explained with example below)

E.g.

Sheet1 Data (input)
A1 (Mark) B1 (2) C1 (4) D1 (6)
A2 (Dan) B2(4) C2 (67) D2 (98) E2(78) F2(870)


Sheet2 (desired output)
Column A Column B
(A1) Mark (B1) 4
(A2) Mark (B2) 6
(A3) Dan (B3) 67
(A4) Dan (B4) 98
(A5) Dan (B5) 78
(A6) Dan (B6) 870
0