excel

DYNAMIC EXCEL REPORT - Make Excel Formula automatically add itself when new rows added

南楼画角 提交于 2021-02-11 12:13:03
问题 I have a table in Sheet1 that looks like this **Sport** Basketball Basketball Basketball Volleyball Volleyball Football Football Football Football Football Football Hockey Hockey Hockey I have a table in Sheet2 that looks like: SPORT Basketball Volleyball Football Hockey SCORE 3 2 6 3 I applied the following formula in B1: =TRANSPOSE(UNIQUE(FILTER(Sheet1!$A$2:$A$15,Sheet1!$A$2:$A$15<>""))) formula in B2: =COUNTIF(Sheet1!$A$2:$B$15,Sheet2!B1) However when the column in Sheet1 is updated. For

vba listbox event fires twice

萝らか妹 提交于 2021-02-11 11:49:07
问题 I am trying to get this to work in excel userforms. When selecting a value in the listbox its change event is called twice. Unable to get around it even after putting a flag in place. Not sure why the change event is called twice. After googling it seams like when the control gets focus the change event is called. Below is the code. Public eventsOFF As Boolean Public ctr As Integer Private Sub ListBox1_Change() Dim tmp As String, sel As Variant, s As Variant If eventsOFF Then Exit Sub

VBA - Excel - Search multiple string through multiple files in a folder

廉价感情. 提交于 2021-02-11 10:52:51
问题 I begin with VBA and programmation. I have a spreadsheet with X values. Each of this values match (or not) with an .xml file in a folder (the value is present in the xml title). What I need is that for each of these values my program search a matching .xml file and write "found" or "not found" next to the value in the spreadsheet. My code so far : Sub StringExistsInFile() Dim theString As String Dim path As String Dim StrFile As String Dim fso As New FileSystemObject Dim file As TextStream

Create New Unique ID Based on Two Columns - Excel

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-11 10:03:47
问题 I have a problem at work where we would take an old SKU number and replace it with a new one. Unfortunately, there are instances where the new SKU number replacing an old SKU number would eventually become an 'old' SKU itself and would be phased out. Below is an example. Old Sku New SKU 06223 34162 06223 34162 06553 01925 06557 19100 06557 19100 06573 11443 06573 11443 51095 06223 51095 06223 With the way I need it formatted for work, I need the three different SKU's to become 1 unique SKU,

Create New Unique ID Based on Two Columns - Excel

醉酒当歌 提交于 2021-02-11 10:02:33
问题 I have a problem at work where we would take an old SKU number and replace it with a new one. Unfortunately, there are instances where the new SKU number replacing an old SKU number would eventually become an 'old' SKU itself and would be phased out. Below is an example. Old Sku New SKU 06223 34162 06223 34162 06553 01925 06557 19100 06557 19100 06573 11443 06573 11443 51095 06223 51095 06223 With the way I need it formatted for work, I need the three different SKU's to become 1 unique SKU,

Get Large and Small for every group where a column value is equal and return a 3rd column value

房东的猫 提交于 2021-02-11 06:57:22
问题 I have a large set of data (approx. 500,000 rows) with water level information. There are 3 columns. A: the water level (i.e. 0.7) B: the date (i.e. 03/01/16) C: the time (i.e 6:06:00) I need to get the 2 largest and 2 smallest values from A for every day B and return A & C. So basically for all the rows where the date is equal find the largest and smaller tell me those values and give me the associated time. Here is a bit of data: 2.730 | 03/04/16 | 3:54:00 2.734 | 03/04/16 | 3:36:00 2.735 |

Pass arguments to a worksheet function as an array in VBA

筅森魡賤 提交于 2021-02-11 06:55:53
问题 I wrote a VBA function that calls the SUMIFS worksheet function. It works perfectly but I would like to get rid of the Select statement. That requires that the Criteria range and Criteria argument pairs, nominally unlimited in number, be passed to SUMIFS as one array which is assembled in the function. Here is my current code. Function SUMIFS(SumRng As Range, _ ParamArray Ifs() As Variant) As Double ' each element of Ifs is an array of 3 elements: ' 0 = Criteria range, 1 = Operator, 2 =

is there any excel formula to record cell last change date?

强颜欢笑 提交于 2021-02-11 06:55:26
问题 I'm looking for a way to save the last change date of a cell in Excel without using the Worksheet_Change event. for example define a formula like this: =LastChangeDate(A22) and when the cell A22 changed , current date show in target cell 回答1: I make a User Defined Function to do that but its is not completely tested. Note two points before using this function : 1- this function shows result after you save document (ctrl+s) or change another cells 2-only change address of target cell and never

Adding hyperlink to dynamically created label in VBA Excel

百般思念 提交于 2021-02-11 06:30:57
问题 I have multiple labels created dynamically on Userform. I want to add a hyperlink to the created labels, is there a way I could add hyperlink to these labels. Here is the code of how I created the labels dynamically. Private Sub cmdViewReports_Click() Dim row_num As Long Dim fso As Object Dim src_path As String Dim dest_path As String Dim sub_folder As String Dim theLabel1 As msforms.Label Dim inc As Integer Dim my_files As Object Dim my_folder As Object Dim i As Integer Dim ctrl As Control

Excel VBA Web Scraping Returning Wrong Text in MSXML2.XMLHTTP method

∥☆過路亽.° 提交于 2021-02-11 06:29:38
问题 I am trying to extract the movie description from this Url, "https://ssl.ofdb.de/plot/138627,271359,I-Am-Legend" When i use CreateObject("InternetExplorer.Application") method it gives me the correct web string as visually seen in the web site (This method is slow) But if i use the MSXML2.XMLHTTP,some of the text returned or non readable text (But this method is fast) Output of First Method:(No problem) Robert Neville (Will Smith) war ein hervorragender Wissenschaftler, aber auch er konnte