worksheet

VBA Worksheet Select Dependant On Cell Value

a 夏天 提交于 2019-12-12 00:27:08
问题 I am pretty new to VBA, so please excuse me if this is a simple question! I have created a template report (titled "Client_Name") that I want populated for each client - in essence all this involves is selecting the client in the PivotTable's report filter and copying the PivotTable's data values to the template. In order to automate this, I have created the following code to duplicate the template and rename it for the client currently selected in the PivotTable: Sheet_Name_To_Create =

UserForm and Range

浪尽此生 提交于 2019-12-11 16:08:09
问题 I have an Excel sheet with column D (column 4) being a dropdown list for every row with 2 choices : Yes No When I click No, I have a Userform pop up with a simple "text zone" asking to enter a value and a "Submit button" to validate. When the "Submit button" is clicked, I want the value from the "text zone" to be implemented into the cell to the right : offset(0,1). Example : D5 : "No" -> "Enters 5 in Userform" -> E5: "5" Here is my code so far : Worksheet : Private Sub Worksheet_Change(ByVal

Excel - Merge worksheets with different structure

99封情书 提交于 2019-12-11 15:55:49
问题 I have a Excel workbook with over 100 worksheets all of which have a different structure (some columns are in all of those worksheets, but some are not). Is there an easy way to merge the worksheets by the columns they have in common? Thank you in advance! 回答1: Do the following: Open the VBA Editor window Click “Tools” from the File menu Select “References” from within the Tools menu Scroll down until you find “Microsoft Scripting Runtime” Check the box next to the “Microsoft Scripting

RichText missing in 'exceljs' - NodeJS

拈花ヽ惹草 提交于 2019-12-11 15:38:13
问题 I am new in NodeJS development. I am trying to read an excel sheet and save the same excel into another file. My Excel sheet contains a RichText (Hello World) - Please see input excel file. And after save into new file, missing the entire cell value - Please see the output. Also see the below code I used to generate the excel file. input excel file: const xlsx = require('exceljs') var filename = 'File1.xlsx' var workbook = new xlsx.Workbook(); workbook.xlsx.readFile(filename).then(function

Macro to sum values from another Workbook with Multiple Sheets

不问归期 提交于 2019-12-11 15:14:58
问题 I am working on a project that requires me to sum multiple values in another excel workbook. The other Workbook contains, say, 120 sheets. I want to take a certain value from each sheet, and sum it along with the rest. The cell reference for all the 120 values is fixed, for example J3. Another thing worth mentioning (maybe) is that the sheet code names aren't organized (i.e. Sheet 1 all the way to Sheet 120), there have been several sheets added/removed in between. Right now I'm getting Run

Worksheet_Deactivate() Cannot Use Active Sheet functions

不想你离开。 提交于 2019-12-11 12:15:49
问题 I have 50 datasheets in the project, and nobody remembers to run the save macro when going to another sheet. The bright idea is to use a private sub Worksheet_Deactivate to do the necessary calculations when they select another worksheet. In addition to the 50 datasheets, there are two more worksheets in the workbook for which the calculation must not run. It would be nice if the sub could be put in "Worksheets" rather than replicated 50 times in individual worksheets, but the two other

Iterate through excel worksheet names, when office not installed using vb6

岁酱吖の 提交于 2019-12-11 11:42:45
问题 I can read an excel sheet without excel being installed thanks to the ACE.OLEDB provider. I can also iterate through the worksheets using the following, but it requires that office is installed if I'm not mistaken: Set xlApp = CreateObject("Excel.Application") Set wb = xlApp.Workbooks.Open(txtExcelFile, ReadOnly:=True, editable:=False) If wb.Worksheets.Count = 0 Then MsgBox "Excel file contains no worksheets" GoTo SubEnd End If Dim i As Integer For i = 1 To wb.Worksheets.Count cboWorksheet

Excel VLOOKUP #REF Error

大城市里の小女人 提交于 2019-12-11 09:14:04
问题 I'm trying to create an integrated athletic planning and training calendar. Part of this is for one sheet to identify weeks in which races occur based upon races and dates identified by the user on another sheet. I've confirmed that my VLOOKUP is not referencing a non-existent column and that the cell style is General for those applicable. Here is the formula: =VLOOKUP(Periods!A6,Races!$F$2:$F$20,2,FALSE) The Lookup Value is the Training week on the first image and is used to identify races

Setting Excel worksheet protection with EPPlus

a 夏天 提交于 2019-12-11 05:06:42
问题 I'm trying to set worksheet permissions for an XLSM file using EPPlus but it seems I can only set the default protection level, individual protections are not being set. For the record, I'm trying to accomplish programmatically method 1 in this article. Here's the code I'm using: using (var p = new ExcelPackage("output.xlsm")) { var ws = p.Workbook.Worksheets["MySheet"]; // Set some cell values here // Filtering, sorting, protection ws.Cells[7, 1, 10, 5].AutoFilter = true; ws.View.FreezePanes

How to set custom settings for worksheet using Excel javascript API?

我是研究僧i 提交于 2019-12-11 05:00:02
问题 I can set settings for whole workbook like here: Office.context.document.settings.set("myKey", JSON.stringify(myValues)); Is there way to do the same but for specific worksheet ? 回答1: You should retrieve the Worksheet.id property and include it as part of each key you set. (Worksheet names are also exposed to the API, but the user can change them, so id is recommended here.) -Michael (PM for Office add-ins) 来源: https://stackoverflow.com/questions/37654909/how-to-set-custom-settings-for