excel

Dynamic filter using excel VBA

半世苍凉 提交于 2021-01-29 07:11:16
问题 Hi I am new to using dynamic search boxes to filter in excel. I have a large dataset that I want to be able to type in any value from the a multi column table and all data with that value will be returned. I have turned the whole dataset into a table and used concat formula at the end of the table. The formula for which is: =CONCAT(Table4[@[Currency Description]:[SUM No. Data Submissions]]& "") Currency Description being mt first column, SUM No. Data Submissions the last. This for some reason

=TODAY() Function not working with code for date criteria

依然范特西╮ 提交于 2021-01-29 07:09:15
问题 Below is the code I am working with to create a new table based on criteria (department and date) from an original table. The MaxDate works when I put in a specific date "8/4/2020", but not when I try and use the "=TODAY()" function. Any ideas? Sub DepartmentSearch() Department = "IT" MaxDate = "=TODAY()" Set rng = ActiveSheet.UsedRange ' source table rng.AutoFilter Field:=13, Criteria1:=Department ' filter Department ActiveSheet.UsedRange.AutoFilter Field:=8, Criteria1:="<" & MaxDate '

Excel: formula to identify missing sku

99封情书 提交于 2021-01-29 07:01:08
问题 I have a list of 1500 sku. Currently we have an active inventory of 450 sku. I am looking for an excel formula that will identify when the sku inputed is not an active sku of the 450. I have tried various IF functions, but having a hard time breaking it down. I have tried this: =IF($B2=F1:F460, COUNTIF(PRODUCTION!$A$1:$AJ$45, $d2), "") The first part of the equation is where we input the inventory. F1:f460 is a list of all the active sku. The second part of the code is where it goes to look

Increment a cell value with a timer

泪湿孤枕 提交于 2021-01-29 06:59:53
问题 Kindly help me on solving the following requirement. In my sheet , say in cell A1 the value of the cell needs to be incremented by 1 till it equals the value of B1 . Cell B1 value would be 10 . When Incremental value of cell A1 reaches 10 , the incremental loop needs to restart from 1 again. The value of cell A1 should increment every minute. I have tried the this with the following formula. I have a macro to refresh excel by 1 minute. =IF((a1+1)<=b1,(a1+1),1) Works fine but returns the

Exporting data from R into an Excel File that contains a graphic with additional text causes the graphic to be deleted

那年仲夏 提交于 2021-01-29 06:50:47
问题 I have trouble when exporting data from R into an Excel file containing a graphic with additional text. The problem is relatively specific. So I have a datatable in R, like this one : library(lubridate) library(dplyr) library(data.table) library(openxlsx) Sys.setenv(LANGUAGE='en') MWE <- data.table( Date=rep(seq(ymd("2020-1-1"), ymd("2020-3-30"), by = "days")), Country1=rnorm(90,2,3), Country2=rnorm(90,2,3)) I then export it in an Excel file using an openxlsx option Fichier <- loadWorkbook(

Worksheet Function Countifs for resizable range

不打扰是莪最后的温柔 提交于 2021-01-29 06:41:53
问题 I have a table in which I count the records through Worksheet.Function.Countif. It is nice because it counts the rows using .Rows.Count and so I am alwasy ensured if my table changes the size. It looks like that (subset of the code): endrow = .Cells(.Rows.Count, 20).End(xlUp).Row ws1.Cells(6, 34).Formula = "=COUNTIF(" & .Range("U6:U" & endrow).Address & ",U6)" I wish to write the the worksheet.function formula in the same way as above but for 'Countifs'. In excel, I would type it like that:

Scroll element in selenium VBA

二次信任 提交于 2021-01-29 06:41:48
问题 I am trying to focus on an element to make this element in the center of the screen or way from the top to be above the middle. This is what I did .FindElementById("toBePaid[" & r - 1 & "]").ExecuteScript "this.scrollIntoView(true); window.scrollBy(0, -(window.innerHeight - this.clientHeight)-150);" But I couldn't see the element as it is at the top-most of the screen of the website. I have tried too .FindElementById("toBePaid[" & r - 1 & "]").ScrollIntoView True But the same problem is still

ValueError: Cannot convert 0 to Excel

有些话、适合烂在心里 提交于 2021-01-29 06:41:37
问题 I have a piece of code that copy/pastes data from Downloaded csv's into a predefined excel template. Some of the csv files have to be transposed before being pasted. This works with no issues on my PC, but on a mac it gives a Cannot convert {0!r} to Excel".format(value) error. Here is the code I am using: def read_transpose(account_id): excel_template = load_workbook('Cost_Optimization_Template.xlsx') ec2_utilization = excel_template['EC2 RI Utilization '] rds_utilization = excel_template[

Excel VBA - Function Stops after using FindNext (Works in Subroutine)

蓝咒 提交于 2021-01-29 06:36:05
问题 I am writing a function that will find all cells in a column in a specified sheet named "Usage" which will have multiple cells matching what I am finding. Problem is that when I try to call FindNext, VBA stops working without throwing any errors. But if I change the function into a subroutine, it works perfectly fine as the Debug shows all 10 cell addresses found . But I need to use a function because I will be returning a value based on the the found results. My function stops right after I

Excel Macro to Filter Column to Today's Date

旧时模样 提交于 2021-01-29 06:15:41
问题 I have a list of dates in column J of my workbook which I would like to have a macro that will automatically filter to only show those rows with today's date in column J. Also, it would be awesome if I can have the code to filter column J by the date referenced in cell K1. Could anyone kindly help me out with the code for both? Any guidance would be greatly appreciated! Here is the code when I recorded my macro to manually select today's date in column J: Sub Filter_Today() ' ' Filter_Today