excel-formula

referencing sheets by number instead of name in cells

倾然丶 夕夏残阳落幕 提交于 2019-12-29 06:23:07
问题 Lets say sheet3.name = "d" Is there a way I could put in a cell on sheet2 the formula =sum(sheet3!b:b) where sheet3 is being substituted with the actual sheet3 name? I can only get =sum('d'!b:b) to work so far. I could use VBA for this probably but I'm curious how to do this in a cell so I don't have to run a macro each time. 回答1: If you can use a UDF User Defined Function that will return the sheet name Function SHEETNAME(number As Long) As String SHEETNAME = Sheets(number).Name End Function

Copying conditional Formatting in Excel

你离开我真会死。 提交于 2019-12-29 02:08:12
问题 I use conditional formatting to format a cell depending on the values of another cell. This is the rule: Cell Value not between =$BV$10*0,5 and =$BV$10*0,5 This rule is saved on Cell Y10 (Explanation: If the Value in Y10 is inbetween 0,5...1,5 * BV10 apply the formatting) I want to use this rule on many different Cells but the formula should adjust automaticly, just like in a "normal" formula. When I copy the format using the Format Painter the formula is copied without any changes. But I

Trim URL to ROOT/SUBDOMAIN with Excel

只愿长相守 提交于 2019-12-28 06:38:25
问题 I need to trim URL's in Microsoft Excel to the root domain and to the subdomain. A1 = Contains https://blog.example.com/page/ B1 = Should result in example.com C1 = Should result in blog.example.com Two formulas removing http, https, .www and PATH. The first version ( B1 ) should also remove SUBDOMAIN. I only have one formula right now: =MID(SUBSTITUTE(A2;"www.";"");SEARCH(":";A2)+3;SEARCH("/";SUBSTITUTE(A2;"www.";"");9)-SEARCH(":";A2)-3) https://example.com/page/page results in example.com

Excel separate cell value

最后都变了- 提交于 2019-12-26 12:34:08
问题 How do I split the text so each option goes to the appropriate option cell(A,B,C.D,E). Please note that the option text length may vary as well and some option might be missing. For example option B might be missing, leaving the option in the cell as ACDE , how can I get it to skip the empty option and go to the next. 回答1: I would tend to use 2 cells working together. Typically, assuming that the string to parse is in C5, your cell first cell (D5 in my example) could contain: =MID(C5,FIND("|"

Excel separate cell value

只愿长相守 提交于 2019-12-26 12:32:06
问题 How do I split the text so each option goes to the appropriate option cell(A,B,C.D,E). Please note that the option text length may vary as well and some option might be missing. For example option B might be missing, leaving the option in the cell as ACDE , how can I get it to skip the empty option and go to the next. 回答1: I would tend to use 2 cells working together. Typically, assuming that the string to parse is in C5, your cell first cell (D5 in my example) could contain: =MID(C5,FIND("|"

VBA Fill 3 Blank Cells Next to Nonblank

不打扰是莪最后的温柔 提交于 2019-12-25 18:46:15
问题 Here is an example of what I am trying to accomplish: I am trying to add an "x" in the next 3 blank cells that are next to a nonblank cell (from left to right). I do not want to overwrite any cells though. As you can see in the first row, only December and January are filled and I did not overwrite February. Any ideas? 回答1: Sub sub1() Dim irow&, icol&, n& For irow = 2 To 6 ' rows n = 0 For icol = 2 To 14 ' columns If Cells(irow, icol) = "" Then n = n + 1 If n <= 3 Then Cells(irow, icol) = "x"

VBA Fill 3 Blank Cells Next to Nonblank

荒凉一梦 提交于 2019-12-25 18:46:07
问题 Here is an example of what I am trying to accomplish: I am trying to add an "x" in the next 3 blank cells that are next to a nonblank cell (from left to right). I do not want to overwrite any cells though. As you can see in the first row, only December and January are filled and I did not overwrite February. Any ideas? 回答1: Sub sub1() Dim irow&, icol&, n& For irow = 2 To 6 ' rows n = 0 For icol = 2 To 14 ' columns If Cells(irow, icol) = "" Then n = n + 1 If n <= 3 Then Cells(irow, icol) = "x"

Inserting a formula using Excel VBA

大兔子大兔子 提交于 2019-12-25 18:38:42
问题 I am needing to insert a formula in using vba coding. at the moment the line of code is =IF( AND( Compliance="No", OR( Delivery <> "", C31 <> "" ) ), "Please Delete Compliance Data", IF( AND( E11="", E13="", E23="", E25="", E26="", E28="", E30="", E31=""), VLOOKUP(C15,'Extrapolated RV Calculator'!B:S,18,0), "Please complete form / SC request" ) )" It seems to error out on the text portions inside the code. Any help would be appreciated. 回答1: Here are four ways to use quotation marks inside

What does — (minus minus) do in Excel? [duplicate]

我只是一个虾纸丫 提交于 2019-12-25 18:38:28
问题 This question already has an answer here : Meaning of two minus signs together (“double unary”) (1 answer) Closed 3 years ago . In Excel I have two cells A1 Gwen Stefani B1 =SUMPRODUCT(--(A1:A10="Gwen Stefani")) B1 records a value of 1 (it counts "Gwen Stefani" in cell A1) My question is this: What is the -- operator called, for want of a better word, and what does it do? Naturally looking up "--" in Excel help gets me 50,200 results of - which isn't helpful ;) 回答1: The (A1:A10="Gwen Stefani"

VLookUp value to another worksheet

时光怂恿深爱的人放手 提交于 2019-12-25 18:37:33
问题 I need to get the value of the corresponding item in Lookup table. But, I am getting N/A in my output. In worksheet1, I need to use column H as a lookup value then reference it in VLookup sheet or Table2 using ColumnC, the corresponding value should get the value in ColumnD. I used this code: =VLOOKUP(H2, Table2, 4, FALSE) Is there something wrong in my code? Sample value: Screenshot for Sheet1: Screenshot for VLookup 回答1: Correct your vlookup to : =VLOOKUP(H2,C2:D128,2, FALSE) Or define