wb2

  1. D

    Save and close a wb

    I have some code that is meant to save and close the workbook identified in the select statement (Wes_reference or Riv_reference) but it is not closing it. What have I left out? Sub AddReference() Dim wb1 As Workbook, wb2 As Workbook Dim sh1 As Worksheet, sh2 As Worksheet, site As String Dim...
  2. M

    VBA Check Sheets Names

    Hello Everyone, I have question about checking specific sheets names in opened workbook before copying them to the correct workbook and if one of them does not exist then exit sub. Currently I have this code: Sub test() Dim Wb1 As Workbook Dim Wb2 As Workbook Dim workbookpath As String...
  3. B

    Copy and Paste then Auto save from 2 wbs into 1 wb

    Hi all How to copy and paste 2 wbs from 2 locations into one then run macro 1 then auto save the combine wb into the same folder with wb1 , same name as wb1 but add specific text1 and time stamp at the end & (.csv ) After that, the macro will automatically redo copy and paste 2 wbs above...
  4. G

    Erase values linked to external files

    Hi all, I wonder if there is a code for doing the following: I have a WB called WB1 with Sheet1 with links to another WB, called WB2, Sheet2. Is there a possibility to delete all the values that came from this external file (WB2)? I mean erase all of them quickly. Thanks in advance!
  5. L

    Stuck: Compare worksheet value and output to new file with unchanged AND changed values

    I've just started this job, and I know this can be done easier than it is right now. Currently, it takes days to manually locate changed data in a newly submitted file (WB2) and update the master spreadsheet (WB1). I've used the Compare worksheet function in Excel 2016 which has provided me...
  6. J

    VBA: Update Read-Only Workbook

    Hello there, I'm not sure if this is even a possibility... I'm hoping so! Currently, in wb1, I have a macro that opens wb2 to update data and if wb2 is read-only, it will ExitSub. My concern is, wb2 will be accessed VERY frequently by other users so I’m wondering if I set wb2 as read-only to...
  7. J

    Working with multiple workbooks using VBA

    Hello, I currently have this code: Dim FileName As String FileName = Sheets("Tracker").Range("A4") Dim FileName1 As String FileName1 = Sheets("Tracker").Range("A5") Set wB2 = Workbooks.Open("file location") If wB2.ReadOnly Then ActiveWorkbook.Close...
  8. K

    Perfoming a vba code in a different workbook

    I am trying to have one workbook (Wb) open another workbook (Wb2) and perform an existing code that is in Wb to Wb2.
  9. M

    What is the VBA code for referring another sheet which contains raw data?

    I am writing a code in a Module of WB1 and this code shall refer to all the raw data given in Sheet1 of WB2. What would be the piece of code???
  10. S

    Silly Question: formulas referencing tables in closed workbooks

    So this might be a silly question .... I have done some research and haven't quite found an answer that either makes sense to me, or is clear enough. I am having an issue with some of my formulas. I have workbook 1 (wb1) and workbook 2 (wb2). In wb1, I have some formulas, let's use Vlookup as...
  11. A

    I can not determine how to transfer a sheet to overlay or replace one in another workbook

    Using Win10 and Office2013, I have 2 workbooks in same folder. wb1 uses form textboxes to input data that Imove to rows of 'Sheet1' when user hits form 'Post' button. Each row specifies wb2 sheet names and col/rowcoordinates to be updated from this data. At completion user hits 'Transfer'button...
  12. A

    Switching Views Between Windows

    I feel a bit silly asking this as it should be one of the more basic Excel VBA commands. I have an open maximized workbook (wb1). VBA code within this workbook creates a copy of one of it's worksheets to a new workbook (wb2) through a userform (uf1) and saves it. After wb2 is saved, it remains...
  13. S

    Formula to copy text from a different sheet with a condition

    I have 2 worksheets from 2 separate workbooks. For this question I will say Workbook 1 and worksheet 1 is called WB1 and WS1, the other is WB2 and WS2. On WB2, WS2, I want it to extrapolate row information from WB1, WS1 if it contains the word DV in Column A2-A117. I want it to pull info...
  14. J

    VBA select between to workbooks

    Having two workbooks WB1 stored under: C:\WBA.xlsx Sheet 1 WB2 stored under: C:\WB2.xlsx Sheet 1 Now I want to create a macro which first activates cell A1 in sheet 1 in WB1 and then by tabbing F8 in VBE selects cell A1 in sheet 1 in WB2
  15. S

    Enter value in WB2 only if a value is present in both WB1 and WB2

    I have two workbooks say WB1 and WB2. I need to enter the value in the WB2's new worksheet only if a value is present in both WB1 and WB2. How can I do this using macros. Please help. Thanks!
  16. R

    VBA Declaring a workbook

    Hello, I found this code below and modified it to work for my purpose. It goes into a workbook and copies a range into another workbook in a specific sheet. I keep getting an error on the "Set wb1 = Workbooks" line. It appears it can't find the WB. Can someone tell me what I'm missing? Sub...
  17. D

    VBA Import cells from a closed workbook

    Hi all, I have spent hours searching through past threads to try and come up with a solution but I have failed and I'm not good at VBA. So your help would be greatly appreciated. I am trying to import a range from a closed workbook into an open workbook. This is what I have so far: Sub...
  18. P

    how to add sheet name in workbook to open?

    Hi, good morning. I have the code below where it copies info from G:\ and pastes into my sheet1, but on my G:\Rota 2017.xlsx I have 2 sheets, 2017 and 2018, and I want the data copied from sheet 2018 how do I add the sheet name into the workbook open link? many tanks for your time. Private Sub...
  19. R

    Transferring Data from Multiple Workbooks into One Master Workbook Using Headers

    I have three workbooks that I am trying to move into one by matching the headers (we’ll refer to the workbooks as WB1, WB2, WB3 and the new as the master sheet). Some information about the existing workbooks and the master sheet. Master sheet is blank, except for the headers. Headers match...
  20. R

    Pulling data from multiple workbooks to a master workbook using headers

    I have three workbooks that I am trying to move into one by matching the headers (we’ll refer to the workbooks as WB1, WB2, WB3 and the new as the master sheet). Some information about the existing workbooks and the master sheet. Master sheet is blank, except for the headers. Headers match...

Some videos you may like

This Week's Hot Topics

  • Launch Script When Tab Is Opened
    Hello all! Is there a way to launch a script or message every time a particular tab (DATA1) is selected/opened? I know it can be done when...
  • VBA that can extract words that starts with # and ends with 2021.
    Hi Everyone, I am straggling to in searching for a vba code that will extract a string that starts with # and ends with 2021. The string has no...
  • Date update overflow error ‘6’
    Dear MrExcel community, I have a project search & update & add & delete can do. There are 32 column and 5 of them is date. When I search date...
  • VLOOKUP Formula ?
    Hi i am using this below but i need to return Column C on Detailed_view. You can see ,1 this returns D, but i need to return C before D. I tried...
  • conditional formatting the whole row
    Hello This is a question solved earlier by etaf. But I am getting some problem. I need help to correct the formula as it is not working in some...
  • Vlookup in vba
    Hi, I am new with the VBA, can someone help me, I have made this macro, but the loop across files in a directory runs only in cell G13, and I...

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