copy data from one column to another on certain condition

cds

Board Regular
Joined
Mar 25, 2012
Messages
84
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]a[/TD]
[TD]b[/TD]
[TD]c[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]batsman[/TD]
[TD] [/TD]
[TD]runs[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD] sunil[/TD]
[TD][/TD]
[TD]14[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD] c kapil b salil[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD] malcom [/TD]
[TD][/TD]
[TD]28[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]runout[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]peter [/TD]
[TD][/TD]
[TD]49[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]b steeve [/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]sachin [/TD]
[TD][/TD]
[TD]35[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]c lily b steev [/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]extra[/TD]
[TD][/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]total[/TD]
[TD][/TD]
[TD]130[/TD]
[/TR]
</tbody>[/TABLE]

Hi, I have data something like aboves

I want help to write vba for copying data in between batsman to extra. Here I want to copy a3 to b2, a5 to b4 & so on whenever c column is blank between batsman & extra . Please help me out


thanks in advance
 
Last edited:
If I want to add similar data from multiple sheet to One sheet . How Do I do it,
Remember that we are not familiar with your circumstances so we need details like ..
Where are the multiple sheets? Are they all in the same workbook as the first one?
- If so, is it every sheet in that workbook that needs to be 'treated'? If not, how do we work out which ones need this action and which ones don't?
- If not, how do we identify where the sheets are?

Also, how should the multiple results get arranged on the single result sheet? The sample I used ended up putting data in columns A:E starting at row 1 of the new sheet. Is that what happens for you or do I have may sample data not quite right? Where should the other score sheets go on the results sheet?



Also advise me any resources available to improve my excel skill.
MrExcel forum & lots of practice. :)
 
Upvote 0

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Dear Peter_SSs thank you for reply reply and advise. All my sheets are in one workbook. first I will insert column in all worksheet and copy worksheetname or worksheet identifier in all sheets through VBA and run your code and copy selected rows to sheet called as summary sheet" at the end for further analysis can you help me out please .
 
Upvote 0
Further while copying I want add autonumber or sr number at the 2nd column.. first coulmn will remain as sheetname or sheet indentifier ie., match nos say 1,2,3,4 etc and result will start from 3rd column . thanks io advance
 
Upvote 0
That still isn't clear to me. Can you show two of the raw data sheets and what the final result sheet would look like? To do so, please use one of the methods I suggested previously so that we can clearly identify what rows and columns the data (& results) are in. We cannot tell that information if you only post your data like in post #11 .
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,636
Latest member
laura12345

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