Link to home
Start Free TrialLog in
Avatar of Satish Gupta
Satish Gupta

asked on

cell should get update based on date in other file.

Hi Team, Need 2 help with my excel file.

1. I have attached 2 file. Daily report should update on  as per date in utilization sheet.xlsm. See the attached Daily Report file where i have use macro record option.

Need: I need that once date get change from 07-Jan-19 to 08-Jan-19 in (E7: Daily report.xls) so update button should take data from next column (G8, G21).

2. Once we are taking the screenshot its taking TAB name in 1st row, instead of tab name, i need that it should  take (E8) "Daily Work hour report for 07-Jan-19" text.

Thanks
Utilisations.xlsm
Daily-Report.xlsm
Avatar of Roy Cox
Roy Cox
Flag of United Kingdom of Great Britain and Northern Ireland image

I'm actually working on this for you, you shouldn't duplicate questions.

I'm not really sure what you want with updating the cell. You could actually use VLOOKUP to bring the data in from the other workbook.

Is the utilisation workbook where he changes will be made?
Avatar of Satish Gupta
Satish Gupta

ASKER

Hi,
I am sorry for the repeating my question again.

I need two help.

One with screenshot macro: Once we are using screenshot button its generating screenshot but first top row (1-8) are blank. How to start screenshot from top? also in the screenshot tab it is taking Tab name in first row, instead should take Date in range (E7).

Second help which i need that range F9:G11 (daily report) should automatic take data from Utilisation sheet (F15:F17, F28:F30)  once i click on Update button. but the condition is that it should update based on date given on (E7) range. (e.g. if E7 = 7 Jan 2019 so it should take data from utilisation sheet (F15:17, 7 Jan 19)
Utilisations.xlsm
Daily-Report--Autosaved-.xlsm
I've a really busy week, but I'll try to look at this tomorrow.

Is the screen shot working in the other question?
Yes it is working but I need some changes please look into this as well. See my previous comment to know what else changed do I need?
ASKER CERTIFIED SOLUTION
Avatar of Shums Faruk
Shums Faruk
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you for the help, this my solution which i was looking for, please help me with below one

How to give multiple file names in this code

Set sWb = Application.Workbooks.Open(Filename:=tWb.Path & "\Utilisations.xlsm", UpdateLinks:=True, ReadOnly:=True)

I have many files in folder and my utilization sheet are monthly basis and have many names i.e. "Utilisations_Jan" , "Utilisations_Feb" , "Utilisation_Mar". How can i give names in code for all file names

I have used this code but this is not working
Set sWb = Application.Workbooks.Open(Filename:=tWb.Path & "\Utilisations_Jan.xlsm", "\Utilisations_Feb.xlsm", UpdateLinks:=True, ReadOnly:=True)

i need this because we are going to rename the Utilisation sheet on monthly basis like _jan, feb, mar
Hi Satish,

This is totally different question and which range it will update for Feb, Mar, etc in Daily Report?
Other way I think we can give you option of selecting the file which you need to update.
We are going to keep one file only in folder but it is going to change on mothly basis. so if E7 = 7-FEb-2019 so value will update from utilisation_feb excel workbbok
Try below, its not tested

Set sWb = Application.Workbooks.Open(Filename:=tWb.Path & "\Utilisations*.xlsm", UpdateLinks:=True, ReadOnly:=True)
No this is not working.
If there would be only 1 file in that folder then try below;

Set sWb = Application.Workbooks.Open(Filename:=tWb.Path & "\*.xlsm", UpdateLinks:=True, ReadOnly:=True)