Split in row and auto insert row as per requirement

Vishaal

Well-known Member
Joined
Mar 16, 2019
Messages
543
Office Version
  1. 2010
  2. 2007
Platform
  1. Windows
  2. Web
Hi, we have the following sheet where we want to split in row wise instead of column wise, can we do this from macro or any formula, its a large database

query sheet
S.No.CodeNamePriceTotalQty
18185,7965,8175General,hest254,tinkvol1140,320,280105,240,2101,1,1
26594jhset1401051
37652,8795,8473,8265rosey,randy-1,dom(vol1)(ed-1),Series test320,280,140,295240,210,105,2211,1,1,1


required sheet
S.No.CodeNamePriceTotalQty
18185General1401051
27965hest2543202401
38175tinkvol12802101
46594jhset1401051
57652rosey3202401
68795randy-12802101
78473dom(vol-1)(ed-1)1401051
88265Series test2952211



If there is no formula, kindly help with VBA please
 
Last edited by a moderator:
Strange it is working fine for me.
Is your file an XLSM file ?

This shouldn't make any difference but if that is the line it goes to when you hit debug, try adding .Value2 into the line.
Rich (BB code):
Sheets("ReqSheet").Range("A2").Resize(nxtRow - 1, UBound(outarr, 2)).Value2 = outarr

If it still doesn't work then before that line put the following and show me what appears in the immediate window
VBA Code:
    Debug.Print "nxtRow " & nxtRow
    Debug.Print "UBound(outarr, 2)) " & UBound(outarr, 2)
    Debug.Print Sheets("ReqSheet").Range("A2").Resize(nxtRow - 1, UBound(outarr, 2)).Address

If none of the above work or provide any insights can you share your file using dropbox, google drive or another sharing plaform (allow access to anyone with the link)
 
Upvote 0

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Forum statistics

Threads
1,223,884
Messages
6,175,177
Members
452,615
Latest member
bogeys2birdies

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