Macro Help:VBA

Puppies72

Board Regular
Joined
Mar 29, 2010
Messages
211
Hi all,

Hi all,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
I need a macro to update some data – can’t use vlookup as the data isn’t sorted the way vlookup requires it to be:<o:p></o:p>
I am copying data from sheet ‘Validator’ to sheet ‘Ships’<o:p></o:p>
The macro needs to do the following:<o:p></o:p>
Locate the value in Validator!BD7 then find that value in sheet Ships! Column A, note the row number<o:p></o:p>
Then copy Validator BI7:BZ7 and paste values only to sheet Ships!F:W at the row in which the value in Validator!BD7 was found <o:p></o:p>
Then it needs to start the whole thing again at Validator!BD8 and continue until a blank cell is found<o:p></o:p>
Any help would be greatly appreciated

thanks in advance as always
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Hi all,

I am starting to piece together the code for this myself based on previous macros and code snippets I have, however...

can someone show me the code necessary to find the value from Validator!BD7 in Ships!column A

many thanks
 
Upvote 0
Hi. This will give the row number or an error if a match isn't found.

Code:
rw = Application.Match(Sheets("Validator").Range("BD7").Value, Sheets("Ships").Columns("A"), 0)
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,728
Members
452,939
Latest member
WCrawford

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