excel-formula

How to delete these specified columns?

a 夏天 提交于 2020-01-11 12:24:22
问题 I want to delete specific columns to all sheets in a workbook. When I run my codes, it will only remove the columns specified in the first line. The rest are not included. How do I do it with many columns to specify? How do I go about this? Sub Dosomething() Dim xSh As Worksheet Application.ScreenUpdating = False For Each xSh In Worksheets xSh.Select Call DeleteColumns Next Application.ScreenUpdating = True End Sub Sub DeleteColumns() Dim ColumnsToDelete As String, V As Variant

Excel Formula for Sigma Equation

末鹿安然 提交于 2020-01-11 08:05:30
问题 How to create an excel formula for the above equation? Eg. N = 10, P = 9.4 Thanks! 回答1: Try the following user defined function: Public Function Zigma(N As Long, p As Double) As Double Dim i As Long Zigma = N For i = 1 To N - 1 Zigma = Zigma - (i / N) ^ p Next i End Function This allows you to avoid array formulas. 回答2: Here it is as an excel formula: =A1-SUMPRODUCT((ROW(A1:INDEX(A:A, A1-1))/A1)^A2) 来源: https://stackoverflow.com/questions/51242105/excel-formula-for-sigma-equation

Excel Formula for Sigma Equation

非 Y 不嫁゛ 提交于 2020-01-11 08:05:13
问题 How to create an excel formula for the above equation? Eg. N = 10, P = 9.4 Thanks! 回答1: Try the following user defined function: Public Function Zigma(N As Long, p As Double) As Double Dim i As Long Zigma = N For i = 1 To N - 1 Zigma = Zigma - (i / N) ^ p Next i End Function This allows you to avoid array formulas. 回答2: Here it is as an excel formula: =A1-SUMPRODUCT((ROW(A1:INDEX(A:A, A1-1))/A1)^A2) 来源: https://stackoverflow.com/questions/51242105/excel-formula-for-sigma-equation

Sending email from excel automatically based on date

依然范特西╮ 提交于 2020-01-11 06:30:32
问题 I have an excel sheet with dated scheduling information. I would like to send daily updates on how many calls and how many appointments have been scheduled every day. The spreadsheet looks as follows: Date Scheduled Called Notes 07/06/2015 0 5 None 07/07/2015 5 12 None 07/08/2015 2 10 None I am trying to write a program that, say on 7/06/2015, an email will be generated with that days scheduled, calls, and notes in the body and automatically sent. Is this possible? 回答1: Here's what I think

How do I only count visible rows when using the COUNTIFS function?

大兔子大兔子 提交于 2020-01-10 03:47:26
问题 I've been using Excel's COUNTIFS function to count the number of rows in a table that meet certain criteria, E.g: =COUNTIFS(Table1[Result],"Fail", Table1[Comments], "") Now I want to modify this expression so that it only counts rows in Table1 that are visible. (I.E. Not filtered out.) How can I accomplish this? 回答1: Simple way is to add another column to table - e.g. called helper with a formula like this =SUBTOTAL(103, B2) where column B is Result column Now change formula to =COUNTIFS

Set formula to a range of cells

萝らか妹 提交于 2020-01-09 09:24:06
问题 this is simple demo of what i want to do. I want to set a formula to a range of cells(eg. C1 to C10). Range("C1").Formula = "=A1+B1" but how to make formula use dynamic cells like this: Range("C1:C10").Formula = "=Ax+Bx" so in reality it is like, C1 = A1 + B1 C2 = A2 + B2 C3 = A3 + B3 C4 = A4 + B4 C5 = A5 + B5 ... C10 = A10 + B10 how to change RHS of this formula to make above working: Range("C1:C10").Formula = "=Ax+Bx" 回答1: I would update the formula in C1. Then copy the formula from C1 and

formula to input a comma in excel

微笑、不失礼 提交于 2020-01-07 12:30:45
问题 Hi I have here 60 contacts with address. I need to put a comma in the street number after the street name like this example: 12 Chatswood Court, ROBINA 12, Chatswood Court, ROBINA How can I do it in excel without doing a manual because it took so long for me to do it manually ? Thank you for the help 回答1: If address always starts with street number then you can use =SUBSTITUTE(A1," ",", ",1) 来源: https://stackoverflow.com/questions/45856180/formula-to-input-a-comma-in-excel

Conditional Formatting based on relative column

*爱你&永不变心* 提交于 2020-01-07 09:35:17
问题 I have a sheet in which I created a conditional formatting rule: if columnB > 50 then columnA fill color green. The result is OK for the whole of columnA, based on columnB. The problem is that when I copy the format to columnX this should be based on columnY but remains based on columnB. I need an automatic way to format the cells based on the neighbouring column and not a fixed column. 回答1: Take the anchor ( $ ) off the front of your B in the formula for the formatting being copied before

Formula to use File path stored in a cell

妖精的绣舞 提交于 2020-01-07 09:16:25
问题 I have a Cell A1 on a sheet named 'Settings' with the following file path: C:\Users\Arun Victor\Documents\New folder\MASTER.xlsm Sheet1 on the same Workbook has a bunch of cells linked to various cells in MASTER.xlsm like the one shown below: ='C:\Users\Arun Victor\Documents\New folder\[MASTER.xlsm]Employee WOs'!D4 Right now,Whenever there is a change in file path I have to manually edit each and every cell. Instead, I need a formula that uses the File path stored in the common cell A1 and

Formula to use File path stored in a cell

那年仲夏 提交于 2020-01-07 09:16:04
问题 I have a Cell A1 on a sheet named 'Settings' with the following file path: C:\Users\Arun Victor\Documents\New folder\MASTER.xlsm Sheet1 on the same Workbook has a bunch of cells linked to various cells in MASTER.xlsm like the one shown below: ='C:\Users\Arun Victor\Documents\New folder\[MASTER.xlsm]Employee WOs'!D4 Right now,Whenever there is a change in file path I have to manually edit each and every cell. Instead, I need a formula that uses the File path stored in the common cell A1 and