Open location and update the column range in VBA

Rajendra_kodavaty

New Member
Joined
Oct 12, 2015
Messages
23
Hey folks,

I am a novice to excel vba. I need help from experts like you
I have to develop a macro, where i could update the values of closing stock on weekly basis.
Lets consider the macro excel file as Macro1.xlsm and the file containing the closing stock Clsg2.xlsx

My methodology is simple.

  1. First i download all the master stock dump to "Col A (SAP Code)" and "Col B (Description)" in Macro1.xlsm
  2. I need vba code to open the file location of closing stock which is supposed to appear in "Col C" of Macro1.xlsm
  3. From the selected file (Ex: Clsg2.xlsx) i have to lookup the values in column number 6 of Clsg2.xlsx and paste the values in "COL C" of Macro1.xlsm
  4. The range of Clsg2.xlsx in Column number 6 is dynamic(Changes weekly).
  5. After pasting values in "COL C" you will observe only the values of closing stock in Clsg2.xlsx file will be pasted in "COL C" and remaining will return "#NA".
  6. All the rows with "#NA" has to be deleted

If there is any other way to do it, please explain
Thank you Very much!
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Forum statistics

Threads
1,214,979
Messages
6,122,551
Members
449,088
Latest member
davidcom

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