ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to do it in macro? (https://www.excelbanter.com/excel-programming/440927-how-do-macro.html)

Eric

How to do it in macro?
 
Does anyone have any suggestions on how to retrieve a specific cell value
within specific workbook without opening it on macro?

I would like to set if-statement as shown below

WkbkName = "D:\Documents\TS\file.xls"
If wkbk.Sheets("Check").Range("N18").Value = 1 Then
....
Does anyone have any suggestions on how to code the workbook part? in order
to make it work.
Thanks in advance for any suggestions
Eric

Eduardo

How to do it in macro?
 
Hi,
you can use a formula like

=IF('[File.xls]check'!N18=1,"Yes","NO")

if N18 =1 will enter yes otherwise no

hope this helps

"Eric" wrote:

Does anyone have any suggestions on how to retrieve a specific cell value
within specific workbook without opening it on macro?

I would like to set if-statement as shown below

WkbkName = "D:\Documents\TS\file.xls"
If wkbk.Sheets("Check").Range("N18").Value = 1 Then
...
Does anyone have any suggestions on how to code the workbook part? in order
to make it work.
Thanks in advance for any suggestions
Eric


Eric

How to do it in macro?
 
Could you please tell me how to code it in macro VBA?
including the directory
Thanks in advance for any suggestions
Eric

"Eduardo" wrote:

Hi,
you can use a formula like

=IF('[File.xls]check'!N18=1,"Yes","NO")

if N18 =1 will enter yes otherwise no

hope this helps

"Eric" wrote:

Does anyone have any suggestions on how to retrieve a specific cell value
within specific workbook without opening it on macro?

I would like to set if-statement as shown below

WkbkName = "D:\Documents\TS\file.xls"
If wkbk.Sheets("Check").Range("N18").Value = 1 Then
...
Does anyone have any suggestions on how to code the workbook part? in order
to make it work.
Thanks in advance for any suggestions
Eric


Jeff

How to do it in macro?
 
Rons Website would be an excellent resource for this...
http://www.rondebruin.nl/copy7.htm

"Eric" wrote:

Does anyone have any suggestions on how to retrieve a specific cell value
within specific workbook without opening it on macro?

I would like to set if-statement as shown below

WkbkName = "D:\Documents\TS\file.xls"
If wkbk.Sheets("Check").Range("N18").Value = 1 Then
...
Does anyone have any suggestions on how to code the workbook part? in order
to make it work.
Thanks in advance for any suggestions
Eric



All times are GMT +1. The time now is 07:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com