excel

Count apple based on common ID between two tables

南笙酒味 提交于 2021-01-29 14:12:02
问题 I have two Excel tables that look like this: Table 1 A B C ID Stocked Sale 1 shelf sold 5 display sold 9 shelf sold 12 shelf sold 13 shelf Table 2 P Q ID Stocked a2 apple 88 83 1 apple 9 apple I need to count the total number of apples by common ID, given that apples are: stocked on the shelf in Table 1 sold in Table 1 So, the outcome has to be 2 apples. Here is what I have tried thus far: COUNTIFS(B:B, "shelf", C:C, "sold", Q:Q, "apple") I can't figure out how to count by common id... 回答1:

Extracting data from Word to Excel

ε祈祈猫儿з 提交于 2021-01-29 14:09:36
问题 Sub GetFormData() 'Note: this code requires a reference to the Word object model. 'See under the VBE's Tools|References. Application.ScreenUpdating = False Dim wdApp As New Word.Application, wdDoc As Word.Document Dim FmFld As Word.FormField, CCtrl As Word.ContentControl Dim strFolder As String, strFile As String Dim WkSht As Worksheet, i As Long, j As Long strFolder = GetFolder If strFolder = "" Then Exit Sub Set WkSht = ActiveSheet i = WkSht.Cells(WkSht.Rows.Count, 1).End(xlUp).Row 'Disable

Vlookup for an array of values

旧城冷巷雨未停 提交于 2021-01-29 14:02:19
问题 ManagerEmployeeSheet A B 1 manager Employee 2 M1 E1 3 M1 E2 4 M1 E44 5 M1 E41 6 M1 E34 7 M2 E100 8 M2 E17 9 M2 E29 and so on I am making a dynamic dashboard where I need the employees under each manager to be dynamically reflected. DashboardSheet A B 1 Input Manager M1 #basically user inputs one manager name here in this cell 2 E1 3 E2 4 E44 5 E41 6 E34 So when I input M1 manager in cell B1 of DashboardSheet , I should get all employees under him in below cells, similarly if I input any other

Find the top 3 items in an array, with priority given to those higher on a list in the event of tie

痴心易碎 提交于 2021-01-29 13:54:06
问题 My list has only numbers, with a corresponding name to each score in each row. I am looking for a formula to draw lookup the 1st, 2nd and 3rd names with the corresponding rank. However, in the event of ties, i would like still like to draw the largest number, with preference for names higher on the list. 回答1: In cell E1 insert following formula and then copy down. =IFERROR(INDEX($A$1:$A$15,SMALL(IF($B$1:$B$15=MAX($B$1:$B$15),ROW($A$1:$A$15),10^7),ROWS($A$1:A1))),"") Note: This is array

JS Library to create formatted XLSX spreadsheets

青春壹個敷衍的年華 提交于 2021-01-29 13:39:05
问题 I'm currently creating generic spreadsheets in JS using https://www.npmjs.com/package/xlsx . This works fine to generate just a generic spreadsheet to display my data. However, I wanna add a few features. https://imgur.com/a/gJE9mXg is an example of what I want to achieve. It was created using Apache POI, which is only available for Java. The features I want in that screenshot are The ability to add a picture (seen as a logo in the top-left) Ability to change font-color (as seen in the Title

How to compile conditional 3 color-scale Excel rule

点点圈 提交于 2021-01-29 13:23:49
问题 I want to know what I would need to type into the formula box in excel to solve the problem outline below: Key: *Variable/Cell* IF *cellnumber* = 0 shade cells red IF *cellnumber* > (more than) 0 but < (less than) *cell number* shade cells yellow IF *cellnumber = *cellnumber* shade cells green. 回答1: You want Conditional Formatting. Pre-Excel 2007 go to the Data menu and click conditional formatting. Excel 2007 or later go to the Home ribbon and click Conditional Formatting. Here is a guide to

Google spreadsheet script export active sheet only to PDF

。_饼干妹妹 提交于 2021-01-29 13:15:36
问题 I created loop script for send email with PDF attachment. Loop function works correctly without any error. But email sent with attached PDF file shows all data of all sheets. I want to create PDF file only of ACTIVE sheet and not others. function SendInvoiceNew4() { var sheet = SpreadsheetApp.getActiveSheet(); // Loop from CELL Number Value to CELL Number Value EQUAL for(i=sheet.getRange("H11").getValue();i<=sheet.getRange("I11").getValue();i++) {// *************** Enter Start Invoice Serial

Remove words from a cell that aren't in a list

你离开我真会死。 提交于 2021-01-29 13:14:49
问题 I want to remove some words that aren't in a separate list from an excel list. Someone gave me an example with Find/Replace, but i need the exact opposite, meaning that i want to keep the words in the list and remove the other. Also if a word is removed, I would have more than 1 space so i would need to remove multiple spaces. Can anyone give me an example? Thanks, Sebastian EDIT Initial cell contents: word1 word2 word3 word4 Cell contents after script: word2 word4 My list contains: word2,

VBA code to check and create folder system and save file

对着背影说爱祢 提交于 2021-01-29 13:00:16
问题 I'm looking to create a code that takes an active worksheet which once completed and a button is selected it saves it as a new workbook within a folder / subfolder system based on multiple cell values. Some of the cells may stay the same but others may change, giving a variety of potential paths which could already part exist or not exist at all. I've managed to put a code together which does just that but when I change one of the cell values, which ultimately changes the path slightly, I get

Save chart as image (png/jpg) with XlxsWriter

馋奶兔 提交于 2021-01-29 12:55:43
问题 I am generating excel files with XlxsWriter that include some charts. I would like to save the resulting charts separately as images so I can attach them to an email (as a preview of the Excel file I'm sending). I'm able to create the Excel with charts, I just can't find any way to save the charts as an image in the XlxsWriter documentation. I am doing this on a Mac, so unfortunately the solution using win32 doesn't help. excel2img looked promising, but also depends on win32. Example chart