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:eek:ffice:eek:ffice" /><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
 

Some videos you may like

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Puppies72

Board Regular
Joined
Mar 29, 2010
Messages
211
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
 

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
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)
 

Watch MrExcel Video

Forum statistics

Threads
1,122,521
Messages
5,596,653
Members
414,083
Latest member
Mrsash

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
Top