excel

Filtering table to create another table in Excel

非 Y 不嫁゛ 提交于 2021-01-29 10:17:13
问题 I need to receive values from a table where a condition is met. For example I have names and I need to take all values from a table where the name appears. For example the table consists of date, name, expenditures: Date Name Expenditures 2019-01-28 Sara 2.45 2019-04-26 John 32.67 2019-05-07 Peter 55.88 2019-06-14 Sara 62.09 2019-07-03 Sara 12.94 2019-09-30 Peter 5.64 I need to receive all expenditures which has been made by Sara and the Date days when it was done. The result should be the

Excel VBA - Convert existing image in cell to comment picture

杀马特。学长 韩版系。学妹 提交于 2021-01-29 10:14:53
问题 I'm trying to use VBA in Excel to convert a bunch of pictures in a column (one per cell) to a pop up comment image instead so that the sheet is more easily readable. I can find the image I need by iterating through the shapes, and I can set this as an object; but I can't seem to use that onject to populate the comment field. It seems to be looking for a true file path instead. I don't particularly want to have to save each image and then reload it, seems kind of pointless. For Each Pic In

Excel Ribbon Not Switching To Tab When Opening

情到浓时终转凉″ 提交于 2021-01-29 10:11:52
问题 I have an Excel 2013 workbook and am trying to switch a custom tab when the it is opened. I have the following CustomUIx.xml entries: CustomUI.xml <customUI onLoad="RibbonOnLoad" xmlns="http://schemas.microsoft.com/office/2006/01/customui"> <ribbon> <tabs> <tab id="CustomHFG" label="Custom" insertAfterMso="TabDeveloper"> </tab> </tabs> </ribbon> CustomUI14.xml <customUI onLoad="RibbonOnLoad" xmlns="http://schemas.microsoft.com/office/2009/07/customui"> <ribbon> <tabs> <tab id="CustomHFG"

Delete rows using .Range.Find() method

时光毁灭记忆、已成空白 提交于 2021-01-29 10:02:23
问题 I am trying to find each cell that contains the following value "# Results" and if the cell to the right is == 0 then delete the entire row as well as the row below. However, since I am deleting rows, the .Range.Find method gets buggy and fails to find the next occurence after the first deletion. How can I make this code work? Here is the code: sub KillEmptyResults() Dim sRows As Range Dim X As Range Set X = Nothing SearchStr = Chr(35) & " Results" With ActiveSheet.UsedRange Set X = .Cells

counting a range (rows) begingin in B3

不羁岁月 提交于 2021-01-29 10:02:21
问题 I have data that starts in B3 and is dynamic so its range may be 5 rows to 500. I want to loop through the number of rows in the range. This is for a data query on number of report checked in. Dim range1 As Range Set range1 = Sheet1.Range("B3 : B" & Cells(Rows.Count)).End(xlUp).Rows The result should be a range B3:B46 or whatever the end row number is. 回答1: Try this: Dim cell As Range For Each cell In Sheet1.Range("B3:B" & Sheet1.Cells(Sheet1.Rows.count, 2).End(xlUp).Row) 'Do your stuff Next

Excel Dependent Dropdown List - Multiple Rows

荒凉一梦 提交于 2021-01-29 09:58:10
问题 I am trying to create a dependent drop-down list for multiple rows in excel. Essentially, what needs to happen is that the user can select a value for cell A1 and this value will determine the value that they can select in cell B2. However, I need this to be done for multiple rows - the trouble I run into is that if I just copy the data validation down column B, then in all other rows, it references cell A1, not cell A(x). Any ideas? 回答1: You can do this with a combination of named ranges ,

EXCEL VBA: Class Module Variables value location depending on if function

六眼飞鱼酱① 提交于 2021-01-29 09:58:09
问题 I have created a dictionary to combine several bits of data for one event. For example, NameA can have four entries depending on the value in column 5. It can be A, B, C, D. However i would like to display all this information from A, B, C, D on one row in a table for NameA as the end product. So i have created a dictionary with a class module to show this, with the class listing all possible variables to display in final output. Depending on the entries (A, B, C, D) the value in column 1 can

Same value against each cell from a single column?

自作多情 提交于 2021-01-29 09:52:07
问题 I have one column like below: Fruits: Apple Banana Mango Vegetables: Broccoli Tomato Potatoes I would like each value to have their parent name next to it in the cell like below: Apple Fruit Banana Fruit Mango Fruit Broccoli Vegetables Tomato Vegetables Potatoes Vegetables How can I achieve this? 回答1: As per my below screenshot put below formula to B1 cell. =IF(RIGHT(A2,1)=":",LEFT(A2,LEN(A2)-1),B1) Then put following formula to C1 cell =FILTER(A2:B9,RIGHT(A2:A9,1)<>":") 回答2: If your data is

Conditional formatting is not getting applied on the sheets

試著忘記壹切 提交于 2021-01-29 09:49:30
问题 Excel: 2016 Version. I am creating conditional formatting dynamically from VBA with the below code every time when I opened my excel. The rules are getting created, but they are not highlighting the max and min value in a row (conditional formatting 3 and 4). I am so confused, anything I am changing in this code is crashing excel to repair all formatting. Could you please help. PS: My data is alphanumeric and only contains either "D" or "U" at the end of a number. Also, these are for

How to define dynamic cell range for Excel sheet using java?

白昼怎懂夜的黑 提交于 2021-01-29 09:49:12
问题 This is my code: SheetConditionalFormatting sheetCF = sheet.getSheetConditionalFormatting(); ConditionalFormattingRule rule = sheetCF.createConditionalFormattingRule( "MOD(ROW() - 1, 1) = 0"); PatternFormatting fill = rule.createPatternFormatting(); style.setFillForegroundColor(IndexedColors.BLUE.index); style.setFillPattern(CellStyle.SOLID_FOREGROUND); FontFormatting ffRed = rule.createFontFormatting(); ffRed.setFontColorIndex(IndexedColors.WHITE.index); CellRangeAddress[] regions = {