excel-formula

VBA Copy a Worksheet to a New Sheet without Formulas

十年热恋 提交于 2021-01-28 11:12:36
问题 I am trying to copy whatever selected sheet (notwithstanding the name of the sheet) within the same workbook. First, I have tried the code of copying and renaming a new sheet (with formulas) that I found elsewhere. It is working well: Public Sub CopySheetAndRename() Dim newName As String On Error Resume Next newName = InputBox("Enter the name for the copied worksheet") If newName <> "" Then ActiveSheet.Copy After:=Worksheets(Sheets.Count) On Error Resume Next ActiveSheet.Name = newName End If

Excel - VLOOKUP return based on partial string

妖精的绣舞 提交于 2021-01-28 11:03:55
问题 I am trying to get VLOOKUP to return a value based on a partial string. So I want to say: look up this string, look in the list and if you find a partial string matching it, return the date next to it. But not having much luck. In my example, B2 should show: April 9th as the first bit of the string in D2 matches. 回答1: Use: =VLOOKUP(MID(A2,1,FIND(" ",A2,FIND(" ",A2)+1)-1),$D$2:$E$4,2,FALSE) Results: 回答2: Try this one... Will help you =VLOOKUP(LEFT(A3,FIND(" ",A3,FIND(" ",A3)+1)-1),$D$3:$E$5,2

Split address field in Excel

旧城冷巷雨未停 提交于 2021-01-28 10:42:50
问题 I have an excel file with cells with addresses. 3 different data examples: 123 Main Street/n Apartment2 /n New York, NY 10001 123 Main Street/n New York, NY 10001 123 Main Street I would like to split it into three separate fields. However, as the above data shows, some will have 0 occurrences of /n, some will have 2 occurrences. and some will have 3 occurrences. I can handle one occurrence, with: =LEFT(E6, SEARCH(" /n",E6,1)-2) =RIGHT(Export!E6,LEN(Export!E6)- SEARCH("/n",Export!E6,1)-1)

Split address field in Excel

半腔热情 提交于 2021-01-28 10:38:17
问题 I have an excel file with cells with addresses. 3 different data examples: 123 Main Street/n Apartment2 /n New York, NY 10001 123 Main Street/n New York, NY 10001 123 Main Street I would like to split it into three separate fields. However, as the above data shows, some will have 0 occurrences of /n, some will have 2 occurrences. and some will have 3 occurrences. I can handle one occurrence, with: =LEFT(E6, SEARCH(" /n",E6,1)-2) =RIGHT(Export!E6,LEN(Export!E6)- SEARCH("/n",Export!E6,1)-1)

Adding formulas to excel spreadsheet using python

孤街浪徒 提交于 2021-01-28 09:11:20
问题 I am attempting to insert formulas into an excel spreadsheet using python. Examples of the formulas are: =VLOOKUP(B3|"Settlement Info"!$B$2:$R$2199|17|FALSE) =SUMIFS("Payment and Fees"!$I$2:$I$6445|"Payment and Fees"!$B$2:$B$6445|Summary!$B3) =+E3-F3-G3-I3 =IF(AND(I3>0|I3-N3>=-0.1|I3-N3<=0.1)|"Yes"|"No") I tried using xlsxwriter and when opening the ss in excel it repairs by removing the "unreadable" content and those cells show as 0. I've seen the comment that the recalculation should be

Excel extract one word from the any part of the string

情到浓时终转凉″ 提交于 2021-01-28 06:45:22
问题 I have the string containing the address, which sections are divided by commas. Outside Locksbrook Campus (Bath Spa University) Locksbrook Road, Bath, CB1 3QQ located in the D19 cell I would like to extract the name of the city from this string, which is "Bath". The name of the city is always to be placed before the postcode. I have managed with it in 2 steps. First I extracted everything before the last comma, like here: Excel IF statement for trim function =MID(D19,1,FIND("@",SUBSTITUTE(D19

Compare Products use multiple properties

自闭症网瘾萝莉.ら 提交于 2021-01-28 06:04:35
问题 I have an Excelsheet and want to compare the products by multiple values. My Excel looks like this: +-----------+--------+------+-------+---------+-------+ | Name| kcal | Fat | Carbs | Protein | €/kg | +-----------+--------+------+-------+---------+-------+ | Product A | 383,00 | 5,90 | 6,50 | 76,00 | 21,98 | | Product B | 359,00 | 0,70 | 3,20 | 85,00 | 24,90 | | Product C | 380,90 | 5,86 | 8,79 | 73,25 | 32,17 | | Product D | 390,00 | 5,50 | 5,30 | 80,00 | 18,96 | +-----------+--------+-----

Counting Pairs in Cribbage Hand

…衆ロ難τιáo~ 提交于 2021-01-28 04:24:00
问题 Background This is a followup question to my previous finding a straight in a cribbage hand question Objective Count the number of pairs, then score 2 points for each pair. What I have Tried I currently have two different working methods for counting pairs. I was trying to find something potentially better and trying to work with manual arrays (hope that is the right term) ie. {2,3,4} Working formulas are: =(SUM(--(AGGREGATE(15,6,MOD(B1:F1-1,13)+1,1)=AGGREGATE(15,6,MOD(B1:F1-1,13)+1,{2,3,4,5}

Conditional/cascading/dependent drop-down list

为君一笑 提交于 2021-01-28 04:08:24
问题 I am essentially trying to do that this guy is trying to do: Excel drop-down list using vLookup I've gone through the steps and since my data set has about 400 different drop down options I am hoping there is an easier way than naming ranges. I have a list of about 400 different account names. Each of these account names is tied to a household and identified by the household ID number. A household can have anywhere from 1-5 account names. I would like for my drop down menu to be able to

Can dynamic array functions be used as a source in a list validation (“dropdown”) in Excel?

我是研究僧i 提交于 2021-01-28 03:20:46
问题 I would like to use the new dynamic array functions in Excel (like FILTER , UNIQUE , SORT ) as a source for list validations. In the following example, all values in column A where the corresponding value in column B is at least 500 should appear. I use the following formula: =FILTER($A$2:$A$7;$B$2:$B$7>=500) Unfortunately, when I use the formula from cell D2 as a source, I get an error message: I have also tried to put the formula into a name and then reference the name as a source. But that