excel

Merge cells doesn't work after locking and unlocking other cell

拥有回忆 提交于 2021-01-29 09:41:43
问题 I've got a sheet in which I'm trying to merge some cells based on CX cell value. CX cell is also dynamically locked/unlocked based on BX cell value. Although locking/unlocking works fine, I get 1004 error when I'm trying to merge cells with line: Range(Cells(Target.Row, i), Cells(Target.Row + Target.Value - 1, i)).Merge While code is below. Option Explicit Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) If Not Intersect(Target, Range("B14:B50")) Is Nothing And Sh

Add calculated column in pivot table based on other columns in the same pivot table

别等时光非礼了梦想. 提交于 2021-01-29 09:30:00
问题 I have a pivot table that calculates the count of pallets of each type of product and the sum of the age I want to add a calculated field/column with the average age of each product R/Q in this case. But when I try and add calculated field I only get options from the original table, meaning I can't get the count and sum of the apples. Can this be done? EDIT: I want this to be part of the pivot table since I want to be able to sort on this calculated value. If I add this value "outside" I can

Conditional formatting over multiple sheets

北慕城南 提交于 2021-01-29 09:26:23
问题 I am a bit of an MS Excel amateur, but I'm pretty sure that Excel can handle something like this. I have a spreadsheet where the first sheet is a master sheet presenting the codes and description of some tasks, followed by some (multiple) workrole sheets, each having a small subset of those codes that conform to that workrole. Master Sheet Code | Description | Module 1 | Module 2 | Module 3 | ... 4 XYZ Yes No No 6 ABC No Yes Yes Workrole Sheet Code | Module 1 | Module 2 | Module 3 | ... 4 7 I

Replace superscript of Footnote reference in the footnotes only

ε祈祈猫儿з 提交于 2021-01-29 09:23:55
问题 I am trying to convert the footnotes into a specific font style (Chicago Style). I have managed to change font of footnotes separately but I can't refer to the footnote reference number in the footnotes of the pages. I am trying to convert the superscript into a normal number and can't get the code to work for some reason. It keeps changing the superscripts in the rest of the body of the document which is not what I am looking for because reference number in body are kept superscripted. Any

Store and open a Workbook in VSTO as “resource”

痞子三分冷 提交于 2021-01-29 09:20:46
问题 So, I have a workbook which is pretty complicated to reproduce programatically. To make my work faster and easier I am looking for a solution to "store" the workbooks into my VSTO to be free to open a copy of it. It seems useful to me but I haven't find any way to do it for now. I hope someone can help me to do it or explain to me how to do a better way. 回答1: You can just include it to the VSTO add-in installer along with other files. So, the workbook will be kept with other add-in files in

Excel Formula to split columns where cells may contain multiple values into another column, where each cell only contains a single value

拥有回忆 提交于 2021-01-29 09:17:06
问题 I have a column in Excel that looks like the below: And what I want is a formula that can copy the column into the next column splitting each cell with multiple values so that each cell will only contain a single value. Similar to this: Thanks for your help! 回答1: Use Powerquery, Split by linefeed and into new rows =) Let's imagine this set of data: Select your data, A1:A7 in this example. Import this data into PowerQuery AKA Get&Transform (including headers). Under "Home" click, "Split Column

How to merge Worksheets from Multiple Workbooks into New WorkBook

给你一囗甜甜゛ 提交于 2021-01-29 09:11:28
问题 I want to merge data from multiple worksheets of multiple workbooks. For example, I have multiple Workbooks with multiple worksheets. So consider I want to merge data from "Worksheet1" of "WorkBook1" and data from "Worksheet2" of "Workbook2" and respectively into "NewWorkSheet" of New "WorkBook". I want to do this in a way that data is inserted into "NewWorkSheet" one below the other, like the first 20 rows from "Worksheet1" then next 20 from "Worksheet2" and so on... I could merge into a new

Excel size decreases on resaving using docx4j library implementation

孤者浪人 提交于 2021-01-29 09:10:47
问题 When i generate excel using below code the file size is 79kb. (STEP 1) If i open the excel, do nothing and save it. The file size decreases to 33kb. (STEP 2) What could be reason for it and how can i avoid this? After extracting the excels i obeserved that theres size variation for drawing.xml's. Step 2 Xml is formatted and has leading and trailing spaces. Where as Step 1 xmls are TRIMMED . I have used DOC4j library for the implementation. After resaving the file size decreases. ` public

Excel Formula to split columns where cells may contain multiple values into another column, where each cell only contains a single value

ⅰ亾dé卋堺 提交于 2021-01-29 09:09:33
问题 I have a column in Excel that looks like the below: And what I want is a formula that can copy the column into the next column splitting each cell with multiple values so that each cell will only contain a single value. Similar to this: Thanks for your help! 回答1: Use Powerquery, Split by linefeed and into new rows =) Let's imagine this set of data: Select your data, A1:A7 in this example. Import this data into PowerQuery AKA Get&Transform (including headers). Under "Home" click, "Split Column

how to enable all macros of excel using vb.net

冷暖自知 提交于 2021-01-29 09:05:17
问题 Currently, I am working on vb.net that needs to export an excel file with Macros enabled. The Macro is used to disable editing the cells in Excel. For some reason, the options settings on the other computer are not set to Enable all the Macros and the user can edit any cells on the Excel file that could lead to misinformation of the report to be sent on the Factory. This is the link where you can see how to enable all Macro Enable Macros Now, My question is: How to enable all macros on the