to get the values from data file to format file, based on sheet name, reference column and date

ashwinashes

New Member
Joined
Nov 12, 2019
Messages
1
I have two excel files, one is file named data and other one is flile named format. The data file has multiple sheet named as "north" ,"south" and "west", each of these sheets have a reference column containing values a, b,c,d,e as values of first column and dates from Nov 4 to Nov 10 as values of first row. And corresponding to these dates and reference column, there are numerical values in the cells. Similarly, in the file named format, the first column has these values which are the sheet names of data files, like north south west, second column is the reference values from first column of data file, a, b, c, d, e, and the first row has dates, as same as in the other file, now I need to get the values from data file to format file, based on this sheet name, reference column and date, something like a lookup but a complicated. Pls help me out. i need the vba script for doing this

data file : (considering the sheet name is north)
reference
2019-11-04

<tbody>
</tbody>
2019-11-05

<tbody>
</tbody>
2019-11-06

<tbody>
</tbody>
a123
b456
c789
d101112
e131415

<tbody>
</tbody>

format file :
sheetreference
2019-11-04

<tbody>
</tbody>
2019-11-05

<tbody>
</tbody>
2019-11-06

<tbody>
</tbody>
westb
westc
northb
northc
southb
southc

<tbody>
</tbody>

expected output:
sheetreference
2019-11-04

<tbody>
</tbody>
2019-11-05

<tbody>
</tbody>
2019-11-06

<tbody>
</tbody>
westb
westc
northb456
northc789
southb
southc

<tbody>
</tbody>
 

Some videos you may like

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Watch MrExcel Video

Forum statistics

Threads
1,127,573
Messages
5,625,594
Members
416,121
Latest member
MrBuzz

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