VBA retrieving information 2 spredsheet

neveu

Board Regular
Joined
Jan 27, 2009
Messages
225
hello Forum,

i would need your advise on solving the next chalenge in Excel.

i have a list with invoice ordinal number ( from 1 to 40 - which depicts the position in a list ) in the Columns spreadsheet.
see image attached

image1

Uploaded with ImageShack.us


in another spreadsheet -matching panel- i have a list with the invoice number (generally a 10 character number but can also be a text aroudn 20 characters).

image 2

Uploaded with ImageShack.us
[the information from print screen are displayed starting wiht column D - frist 3 columns are hidden]
what i would need to through a VBA code is to copy the invoice number from the Matching panel over the respective ordinal number in the Columns spreasheet.

for example, invoice number 51217835 from matching panel should be copied over 1 in the columns spreadsheet as it is the first item in the list
similarly, db3s79ab110421-30259 should go over 3 as it is the 3rd item in the list


any help would be highly appreciated
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
hello Forum,

i would need your advise on solving the next chalenge in Excel.

i have a list with invoice ordinal number ( from 1 to 40 - which depicts the position in a list ) in the Columns spreadsheet.
see image attached

image1

Uploaded with ImageShack.us


in another spreadsheet -matching panel- i have a list with the invoice number (generally a 10 character number but can also be a text aroudn 20 characters).

image 2

Uploaded with ImageShack.us
[the information from print screen are displayed starting wiht column D - frist 3 columns are hidden]
what i would need to through a VBA code is to copy the invoice number from the Matching panel over the respective ordinal number in the Columns spreasheet.

for example, invoice number 51217835 from matching panel should be copied over 1 in the columns spreadsheet as it is the first item in the list
similarly, db3s79ab110421-30259 should go over 3 as it is the 3rd item in the list


any help would be highly appreciated


Will there always be only 40 numbers in a row that you need to copy and paste into the first table?
And will the data always start on Row 26 of Column A and paste over Row 6 Column A of sheet1?

If so, you could just record a macro of you performing the copy/paste.
 
Upvote 0
Will there always be only 40 numbers in a row that you need to copy and paste into the first table?
And will the data always start on Row 26 of Column A and paste over Row 6 Column A of sheet1?

If so, you could just record a macro of you performing the copy/paste.

hello,
there can be more than 40 rows, or less.
i cannot use the macro recorder as i will not know what ordinal number i will have in the first spreadsheet
 
Upvote 0

Forum statistics

Threads
1,224,592
Messages
6,179,789
Members
452,942
Latest member
VijayNewtoExcel

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