Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-26-2015, 07:59 PM
get4hari get4hari is offline Looping through rows and copy cell values to another worksheet Windows 7 64bit Looping through rows and copy cell values to another worksheet Office 2010 64bit
Novice
Looping through rows and copy cell values to another worksheet
 
Join Date: Sep 2015
Posts: 6
get4hari is on a distinguished road
Unhappy Looping through rows and copy cell values to another worksheet

Facing some diffculty in achieving the desired result for my macro.



Intention: I have a list of data in sheets(inputs).column BN(the number of rows that has value will vary and hence i created a loop that will run the macro until the active cell is blank). My macro starts from Range(BN2) and stretches all the way down column BN, it stops only when it hits a blank row
Desired result for the macro will be to start copying the cell value in sheet(input).Range(BN2) paste it to sheet(Output).Range(A2:A10).
For example, if "Peter" was the value in cell sheet(input),range(BN2) then when the marco runs and paste the value into sheet(Output) range(A2:A10). ie range A2:A10 will reflect "Peter"
Then the macros loop back to sheet(inputs) & copy the next cell value and paste it to range(A11:A19) Example: "Dave" was the value in sheet(inputs) Range(BN3), then "Dave" will be paste into the next 9 rows in sheet(mywork).Range(A11:A19). A11:A19 will reflect "Dave"
Again repeating the same process goes back to sheet(input) this time range(BN4), copys the value goes to sheet(Output) and paste it into A20:A29.
Basically the process repeats....
The macro ends the when the activecell in sheet(input) column A is empty. Urgently seek the advice/assistance from the experts in the forumn. Thanks in advance.
Reply With Quote
  #2  
Old 10-02-2015, 04:51 PM
macropod's Avatar
macropod macropod is offline Looping through rows and copy cell values to another worksheet Windows 7 64bit Looping through rows and copy cell values to another worksheet Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Your task description is ambiguous. For example, it's by no means clear what goes into A2:A10. Does each cell in A2:A10 get populated with 'Peter', or something else? If it's something else, where does the something else originate? And why do there appear to be 9 rows per person (Peter = A2:A10; Dave = A11:A19)? Do all entries have 9 rows, or only some? If only some, what are the criteria?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
macro problem, macros don't work, vba code



Similar Threads
Thread Thread Starter Forum Replies Last Post
Looping through rows and copy cell values to another worksheet Copy Rows down with value from another Cell burlinghamla Excel 1 01-14-2015 06:26 AM
Looping through rows and copy cell values to another worksheet Insert values from multiple rows based on value in one column pachmarhi Excel 3 07-18-2014 09:57 PM
Looping through rows and copy cell values to another worksheet Convert non-cell input to cell values TBD Excel 3 06-09-2014 06:14 AM
Looping through rows and copy cell values to another worksheet How do you copy a row from one worksheet to another? mars1886 Excel Programming 3 02-11-2014 02:12 PM
Looping through rows and copy cell values to another worksheet Copy Worksheet and preserve formulas silverspr Excel 4 02-21-2013 07:51 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:13 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft