excel-2010

Two criteria MINIF and MAXIF formula

时光总嘲笑我的痴心妄想 提交于 2020-02-08 02:26:47
问题 I want the Youngest White cat's date from the excel table below to be displayed in a cell. The youngest would be born 29/07/2015. In another cell i want to display the oldest white cat date 18/07/2015. Column A ->Animal Column B ->Color Column C ->Date of birth I know the formula if its is for one cell =IF(AND(A1="CAT",B1="White"),C1) RowNo------A-----B--------C----- 1------- CAT White 20/07/2015 2--------CAT White 29/07/2015 3--------CAT White 18/07/2015 4--------DOG Black 29/07/2015 5------

Two criteria MINIF and MAXIF formula

帅比萌擦擦* 提交于 2020-02-08 02:25:29
问题 I want the Youngest White cat's date from the excel table below to be displayed in a cell. The youngest would be born 29/07/2015. In another cell i want to display the oldest white cat date 18/07/2015. Column A ->Animal Column B ->Color Column C ->Date of birth I know the formula if its is for one cell =IF(AND(A1="CAT",B1="White"),C1) RowNo------A-----B--------C----- 1------- CAT White 20/07/2015 2--------CAT White 29/07/2015 3--------CAT White 18/07/2015 4--------DOG Black 29/07/2015 5------

how to find cells with “#VALUE!” in EXCEL 2010 VBA

ε祈祈猫儿з 提交于 2020-02-02 16:27:06
问题 I need to find the max value in a column by EXCEL 2012 VBA. Some cells have "#VALUE!". My code does not work. Sub find_max() Dim rng As Range Dim dblMax As Double dblMax = 0 Set rng = Range("A2:A11") For Each cell In rng If (cell.Value <> "#VALUE!") Then // error ! type mismatch If dblMax < CDbl(cell.Value) Then dblMax = CDbl(cell.Value) End If End If Next cell MsgBox dblMax End Sub I also need to print the cell location (mark it with a color) with the max value. Any help would be appreciated

COUNTIF Unique Dates Between a Range

一笑奈何 提交于 2020-02-02 06:12:45
问题 I am trying to find a way to COUNTIF(S) between a certain set of dates, but only get the count of the unique dates. For context, I am tracking meters over days. I can get more than one instance on the same day with differing meter values. The fact that can happen is screwing up my meters/day average. Data!A3:A8700 - is the date range. I am summarizing things monthly, so, in this case, for this example, I'd like something that: 1) Uses COUNTIF (or anything that will work!) between date x and

How to get last word in a cell using Excel Formula

喜欢而已 提交于 2020-01-30 11:34:15
问题 I am trying to get the last word in a cell however, it does not seem to be appearing getting the last word of the cell. It seems to get the partial match and not working correctly. I am using =IFERROR(RIGHT(AP2,SEARCH(" ",AP2)-1),AP2) . This works great for getting the first word in a cell even where the first word is the only word in a cell. Any ideas on why this is not getting the last word correctly? 回答1: You may try this UDF which can be used in another sub routine or on the worksheet as

Simple way to change a pivot cache

大城市里の小女人 提交于 2020-01-30 08:11:06
问题 This doesn't work... Sub changeData_Error() Dim pc As PivotCache Set pc = ThisWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:=Range("A1:B2")) Excel.Sheets("Sheet1").PivotTables("PivotTable1").ChangePivotCache pc ThisWorkbook.RefreshAll End Sub Have ended up with the following which seems over complicated. Can it be simplified? Sub changeData() ':: this is the table I'd like to change the data Dim mainP As PivotTable Set mainP = ThisWorkbook.Sheets("Sheet1").PivotTables(

excel vba not exporting pagesetup to pdf correctly

可紊 提交于 2020-01-28 02:18:56
问题 I have code which formats a worksheet to the desired setup and layout (one page wide and tall in landscape). When I run the code (part of a long macro) it formats the pagesetup correctly. If I manually export and save it as a pdf, then it uses the correct page setup, producing a one page PDF that is in landscape. However, the same export done by VBA produces a PDF that is severalpages long and in portrait. i can't figure out why it's doing this. i've tried various solutions such as selecting

PowerQuery multiple files and add column

十年热恋 提交于 2020-01-26 04:09:42
问题 I have the inline PowerQuery to automate my weekly reporting. Since I am new to power query I followed up this tutorial and try to add a custom column so I can use it to see week over week improvements, the thing is that the column that is added is not named "Week" but instead it is called the name of the file. From this webpage the second parameter is column name. I do not find why column name is filename instead of the name "week". let ExcelFile = (FilePath, FileName) => let Source = Folder

How do I reference an Excel ListObject table column if the column name has line breaks?

给你一囗甜甜゛ 提交于 2020-01-25 23:00:11
问题 I'm tasked with the following: several sheets from different workbooks have to be copied to a new workbook each of those sheets contains an Excel table (a ListObject), named like the sheet with a postfixed T (sheet Foo, table: FooT) the new workbook has to contain a summary sheet where each table name is listed, and various values of the respective tables are presented by referencing them with suitable formulas This has to be done frequently for different workbooks, so the idea was to do this

list specific file type in directory using excel 2010 vba

寵の児 提交于 2020-01-25 21:13:53
问题 In an excel 2010 vba I am trying to list all .txt files in a specific directory and display them in a message prompt. I hope the below is a good start, but not sure. Thank you :). vba ' LIST ALL TEXT FILES IN REPORT DIRECTORY ' Const strFolder As String = "C:\aCGH\" Const strPattern As String = "*.txt" Dim strFile As String strFile = Dir(strFolder & strPattern, vbNormal) Do While Len(strFile) > 0 Debug.Print strFile strFile = Dir Loop MsgBox "The files are " + strFile 回答1: Two ways I can