Searching and copying to separate sheet

Yippy

New Member
Joined
Apr 11, 2013
Messages
2
Hi all! I'm trying to build a macro that can do the following to the below table. The reference data is on table 1. As in the example, looks for the date in the table and offsets to the next column to fill in the figure. It does it for every single fruit. There won't be more than 3 fruits. If it does not find it, such as a table for USD, it will not find any Apple and will not return a figure. The reference data will always be in table 1.

Also where table 2 resides, there are separate tables on the sheet for GBP and different currencies so I can always select the range first before executing the search for the date specified in table 1's date column. The date is the previous working day so it will not have a multitude of dates however in table 2, the dates from previous days will be present. Trying to be as through as possible. Can someone assist? It would make my life easier and won't have to manually key it in every day. Thanks!

Table 2 (GBP)
DateAppleOrangePear
4/6/2013151822
4/7/2013859
4/8/201319.65285123.30

<tbody>
</tbody>



Table 1
FruitDateCurrencyAmountFormatted Amount
Apple
4/8/2013CAD.60DB.60
Apple4/8/2013GBP19.65DB19.65
Apple4/8/2013JPY147DB147
Orange4/8/2013AUD2.70DB2.70
Orange4/8/2013CAD123.30DB123.30
Orange4/8/2013EUR233.35DB233.35
Orange4/8/2013GBP285DB285
Pear4/8/2013JPY3.67DB3.67
Pear4/8/2013AUD2.90DB2.90
Pear4/8/2013USD287.85DB287.85
Pear4/8/2013CAD269DB269
Pear4/8/2013GBP123.30DB123.30
Pear4/8/2013EUR2.55DB2.55

<tbody>
</tbody>
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
I don't see this as a macro, it seems you have a currency table that you want to place those values into another spreadsheet. I would suggest defining a named range that you adjust every day and a simple vlookup() or sumifs() from there. You could do a macro to adjust the ranges for you, but I think non macro solutions for simple things are generally best. Please let me know if I'm missing something as I.had difficulty following your example the first few times I read it...
 
Upvote 0
I don't see this as a macro, it seems you have a currency table that you want to place those values into another spreadsheet. I would suggest defining a named range that you adjust every day and a simple vlookup() or sumifs() from there. You could do a macro to adjust the ranges for you, but I think non macro solutions for simple things are generally best. Please let me know if I'm missing something as I.had difficulty following your example the first few times I read it...

Ok that would also work. What would the formula be since there are 3 conditions? Date, product and currency.
 
Upvote 0

Forum statistics

Threads
1,203,096
Messages
6,053,510
Members
444,669
Latest member
Renarian

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