A Formula That Combines The Functions?

Jul 11, 2014

Basically I want a formula that automatically inputs a code based on 'marital status'. This would be easily done using a vlookup except for the fact that one of these marital statuses has multiple options. Example: if the marital status reads "Married" the code can very depending on whether it is different gender/same gender. I have gender codes in a separate column.

For example:

Status--->Code
Single---------------->Sin
Civil P'ship------------>Civ
Married + MM--------->Mar 1
Married + FF---------->Mar 1
Married + MF--------->Mar 2

Married is, of course, in a separate cell from the gender codes, which is why I've attempted to bring the AND function into the IF statement. However, I'm having no luck.

The spreadsheet I am designing is already getting pretty big so I wanted to avoid having more columns than necessary. Is it even possible to group this together in one formula?

This is an example of a formula I have tried but returns the #value error.

=VLOOKUP(I31,Mapping!$A$1:$C$12,3,FALSE)+IF(AND(I31="Married",AH31="MM"),"MAR 12","")

View 3 Replies


ADVERTISEMENT

Macro Combines Data From Several Workbooks Into One Workbook

Apr 19, 2006

I have several individual excel workbooks all in one folder that I need to do some analysis on, but in order to that i need to have them all in one workbook. all of the files are saved in the same folder on my shared drive. each record from each of the files needs to be transfered over into this blank template that i have. I used the Blank template to create all of the individual files, Now i just need to get them all into one file that is easier to work with

View 9 Replies View Related

Fill Series That Combines Data From 2 Sheets In Blocks Of 10

Jun 5, 2006

I have a spreadsheet with two sheets... Sheet1, and Sheet2, that I use as sort of a staging area to format info before bulk uploading to my product database. The products I'm working with at the moment have 10 subcategories below each of them. Sheet1 is the full product database listing. I place new subcategories in blocks of 10 that I plan to add to the database on Sheet2. Sheet2 also holds the default partial category names in cells A2-A11.

Part 1:

I am currently using the following formula on Sheet2, in column C to combine the category name value on Sheet1, with the default partial category name values on Sheet2 (A2-A11). I'll paste two blocks so you have a clear picture of what I mean by blocks of ten.

=CONCATENATE(Sheet1!B3407;" ";Sheet2!$A$2)
=CONCATENATE(Sheet1!B3407;" ";Sheet2!$A$3)
=CONCATENATE(Sheet1!B3407;" ";Sheet2!$A$4)
=CONCATENATE(Sheet1!B3407;" ";Sheet2!$A$5)
=CONCATENATE(Sheet1!B3407;" ";Sheet2!$A$6)
=CONCATENATE(Sheet1!B3407;" ";Sheet2!$A$7)
=CONCATENATE(Sheet1!B3407;" ";Sheet2!$A$8)
=CONCATENATE(Sheet1!B3407;" ";Sheet2!$A$9)
=CONCATENATE(Sheet1!B3407;" ";Sheet2!$A$10)..................

View 6 Replies View Related

Macro Combines Cells Into String But Puts Undesired Comma At The Beginning?

Jul 21, 2014

I have a macro that takes the column of data from D on Sheet 1, pastes it into A on Sheet 3, gets rid of duplicates and then, in B1, combines all the numbers from A into a comma-separated string. The only problem is that it puts a comma at the beginning of the string. Is there something I can do to make that first comma not be there?

View 5 Replies View Related

Remultiple Functions In A Formula...

Aug 1, 2008

I am currently taking Excel but neither my professor nor my text explained how to make a formula where the formula has two different operations, (e.g., division then addition) within the same formula. For example, in Y6, create this formula: Divide P7 by the sums of H4,I4, and J4. I tried this formula but I think it's wrong: =P7/(H4,I4,J4)

View 3 Replies View Related

Formula Using New Functions Or Array

Dec 9, 2008

I have a list of part #s that i need to group together and sort by their corresponding dates. The formula I've written does what I'd like it to do (assign a value to part groups that i can sort by first before sorting by the date) , but is too large/has too many nested functions to be applied. This formula is going to be used with multiple queries from a database that updates regularly.

EXAMPLE OF DATA(6000+ entries)
http://www.excelforum.com/attachment...1&d=1228860131

This is the breakdown of my formula, I've bolded the parts that aren't constant
=IF(AND(LEFT(D2,5)>="S2000"LEFT(D2,5)<"S2005"),1,IF(continues)...................

View 3 Replies View Related

Combinig Two Functions In One Formula

Jan 5, 2009

I've been using Excel for years and had very few issues. However, I recently went into a spreadsheet to update it and was unable to select and enter data into an individual cell. When I click on a cell and try to enter #s nothing happens (my num lock is on).

Then when I try to click into another cell it just highlights that cell, along with any other that I move my cursor over. Once I click on one cell I can't stop the highlighting from happening. I can't even click on anything in the toolbar.

View 9 Replies View Related

Formula That Can Do 2 Different Functions In One Cell

Jun 17, 2006

I'm looking for a formula that can do 2 different functions in one cell. I have a subtotal in A1 and my total in B2. Now, I want B2 to say if A1 is lessequal to $100,000 then multiply by1.5% plus A1 and if greater than $100,000 muliply by 2.5% plus A1.

View 9 Replies View Related

Syntax For Using Variables Within VBA Formula Functions?

Dec 3, 2003

correctly using variables within functions used in formulas specified by VBA. Here's an example:

I want to place a formula within a workbook file called "Books 2003.xls" that goes to the version of the file for the previous year (or whatever year is specified) and does a Sum of a particular range (where that range is also specified as a variable) so it sums up the Total for the previous year for the same number of months that have data in them to date for the current year. Once VBA places the formula where it belongs, it should be able to always provide a running comparisson with the current year to date total and the totals for the same period for the previous year. Here's an example of the intent of this simple formula:

ActiveCell.FormulaR1C1 = "=SUM('[Books 2002.xls]Income Summary'!R4C2:R8C2)"

The workbook files will all be named the same way: Books 2002.xls, Books 2003.xls etc.... The range to be summed will always start at R4C2, but could then end anywhere from R4C2 (same as B4) up to R15C2 (same as B15).

I already have a routine that captures the value for the variable CurrentYear in the form "2003" and thus have another variable for PrevYear (= CurrentYear -1), and so then have a way to correctly specify the variable "BookName" to get the correct filename needed. I also have a variable for the CurrentMonth in the form of "1 through 12", and can use that to specifiy the correct RowNum needed to determine the end of the range (RowNum = CurrentMonth + 3).

I've tried to substitute the variables "BookName" and "RowNum" into the above formula with various combinations such as what follows, but I'm not getting the correct syntax with the right number of quotes etc...:

ActiveCell.FormulaR1C1 = ""=SUM('[" & BookName & "]Income Summary'!R4C2:R" & RowNum & "C2)""

This doesn't work, and I'd love to learn the correct rules for syntax when inserting variables into situations like this.

View 4 Replies View Related

SUMIF OR SUMIFS Functions With Criteria As Formula?

Apr 28, 2014

SUMIF and SUMIFS formula, where in I want to set criteria in the formula as greater than or less than or equal to value derived from another formula. I am inserting the following formula but excel is not allowing me to enter the formula.

=SUMIFS($C$22:$C$30,$E$22:$E$30,>=LEFT(L21,3),$E$22:$E$30,<=RIGHT(L21,3),$A$22:$A$30,G22)

View 3 Replies View Related

Excel 2010 :: Date Formula That Functions Like WORKDAY But Includes Weekends

Jun 24, 2011

Is there a formula similar to WORKDAY that would include weekends and make something due on the next business day? For example, I have a bill due on 6/1/11 and I need to follow up 5 days later - which would be normally 6/6/11 but the WORKDAY formula makes it 6/8/11 as it is adding 2 extra days.

I am using Excel 2010.

View 14 Replies View Related

Functions Compared With VBA Functions

Mar 14, 2008

I am aware of the following topic in the VBA Help file:

"Using Microsoft Excel Worksheet Functions in Visual Basic
You can use most Microsoft Excel worksheet functions in your Visual Basic statements. To see a list of the worksheet functions you can use, see List of Worksheet Functions Available to Visual Basic.

Note Some worksheet functions aren’t useful in Visual Basic. For example, the Concatenate function isn’t needed because in Visual Basic you can use the & operator to join multiple text values."

And I'm aware of how to call Excel funcitons from within VBA; e.g., answer = Application.WorksheetFunction.Min(myRange)

However, not only are some Excel functions not useful; the fact is they cannot be used because VBA has a native function that does exactly the same thing and you have to use that native VBA function to achieve your goal. It is these overlapping functions that I am especially interested in. I want to know what I should use directly in VBA and what I need to go to Excel for.

View 9 Replies View Related

IF THEN Functions..

Dec 4, 2009

I want to calculate the following...

If Cell A>40, Then the result should be ((Cell A-40)*23.25)
If it is not >40, Return 0.00

This is for a timesheet / overtime.

View 2 Replies View Related

Possible Functions In VB

Jan 12, 2010

Is it possible to use excel functions with in VB? (such as CONCATENATE, LOGEST etc.) For example, if I have a site no. and data for this site in an array could I append the site number to the data by:

View 4 Replies View Related

Use Of Vb Instead Of All My Functions

Apr 19, 2007

i have a spreadsheet acting as a type of database (our work wont pay for more licences for access!), and it has multiple functions running. well, it has 3000 lines x2 for 2 sheets with about 5-10 full colums of functions. this means the template file i have starts off at about 10mg. with data, this goes upto around 15-20mb. howver, we get a lot of the massive size increases. however, the sizes we get are often upto 150mb! so, i dont know vb at all, and have only learned functions recently. was hoping someone might be able to help out sorting this out? i dont know if i can upload a coppy online, but i can email.

View 7 Replies View Related

Sum Functions - Add All And Return A Value

Jun 9, 2014

So I have say 1-4 columns that may have an A to describe a student as absent. In the 5th column I'd like it to add all the A's and return a value of 1-4 or if possible... a result that says 4A etc. The column might have another letter in it so i only need to add it up if it has an A in it.

To visualize, i just want to add up the students that have not attended a class.

View 14 Replies View Related

Functions Use For Various Conditioning?

Jun 19, 2014

I wish to set 2 different cases (good and normal sales) for a list of data.

During good sales
- fruits can be sold within 4 hours
- Fruits sold off during peak season (Definition of peak season: 2 calendar days before or on public holiday or 10 days before 31st May)
- < 2 fruits per type

Date of public holiday for example: 1 Jan 2014, 18 Apr 2014, 1 May 2014

For normal sales
- fruits only able to sell of the next day
- Sell of on non-peak season
- > 2 fruits per type

Sample file attached.

View 14 Replies View Related

NESTED IF And AND Functions?

Jun 30, 2014

I am trying to write a formula that will satisfy the following:

C1 and G1 are number values.

IF (cell E1 does not contain any text) AND (G1-C1-12.5>=0), then output (G1-C1-12.5), otherwise output nothing (""). BUT, IF (cell E1 DOES contain text) AND (G1-C1-13>=0), then output (G1-C1-13), otherwise output nothing.

View 2 Replies View Related

Sumif Functions

Jan 8, 2009

I have an entire excel column which was filled-in with values ranging from 1000 to 40000. What I was trying to do is to just sum up the all the values which are between 9000 and 20000. I tried using the sumif function =sumif(and(A5:A40,">9000"),(A5:A40,"<20000")) but it does not work, it says that the formula that I typed contains an error.

View 4 Replies View Related

Marco Vs Functions

Nov 23, 2009

Currently, all of our data in Excel are linked by using Excel Functions between workbooks and some of the files are so large that it may take 10 minutes to open and copy and paste a cell may take three minutes (which is ridiculous slow).

Pardon my ignorance, my understand of Excel VBA/Marco is about automation. Even i use marco to run the excel, i still need formula in the cell in order to perform the task, right?

View 5 Replies View Related

Worksheet Functions In VBA

Jan 15, 2007

Is possible to pass names into a worksheet function and whether values from other sheets are able to be passed in, eg i am trying to paste this function into the work sheet to find the left two characters of a certain string. However the string position varies:

= left(worksheet name! row(1) column.range("startno"),2

View 10 Replies View Related

Check Box Functions

May 18, 2009

I have a cell (D19) that I want to be automated to return a value based on a formula (it will equal Cell D15). But I also want to have the ability to allow the user to override this and enter a manual value if needed. My idea on how to do this is having a check box with a macro where if it is checked it will unlock the cell and clear out the formula and when checked it will reenter the formula and lock the cell.

Also same form - I need a check box that will check all applicable check boxes (all boxes under Deductions to be taken). Can anyone assist me in setting up these check boxes so that my functions will work, or if there is a "better" way of providing these functions please let me know.

View 5 Replies View Related

Interest Functions

Dec 3, 2005

The file I am working with is available here

(1) I need to work out the value of 2 years worth of interest on a loan - details would be

Loan = 30,180.00
interest = 14.90% pa (calculated daily)
term of loan would be 60 months

I am currently using an ammortisation speadsheet which calculates the interest per month etc ... at this time I simply highlight and calculate the interest which would be two years worth ...

the problem is this calculation varies from the bank interest calculations (although the repayments are the same and the total interest payable amounts are the same)

The banks calculations are said to be done on the basis that the minimum monthly repayment is met and there are no additional fees thrown in ... so I cant understand the difference ...

(2) In addition to the above question, but working on the same loan, traditionally amortisation tables calculate the amount of the repayments, the interest component and the principal component ... some include a column where you can factor in additional repayments on a row by row basis (like the one I am referring to) the table assumes that the payment is made on the due date ...

what I would like to be able to do is
(a) insert the actual payment dates
(b) if no payment is recorded for that period, automatically insert an overdue fee

View 14 Replies View Related

If/And Logic Functions

Jan 25, 2007

There are three situations that should yield the answer "overdue" and a fourth and fifth situation that should yield an answer "on target". I'm new to functions and have spent SEVERAL hours on this

{=IF((G4<>0,F4<$g$1="Overdue")+(F4<G4="Overdue")+(G4<>0,F4>$g$1="On Target")+(F4>=G4="On Target"))}

View 10 Replies View Related

Counting Functions - If Col A =5 And Col B < Col C

Oct 3, 2008

I'm trying to find a function for the following statement:

=number of rows where columnA="value" AND columnB<ColumnC

So this formula would return 2 from the below table if the "value"=5...

X A B C
1 5 5 6
2 5 8 9
3 1 6 7
4 5 9 8
5 5 9 9

View 2 Replies View Related

Nested If/or Functions

May 7, 2009

IF/OR function below is not working

=IF((OR(B14=1,2,3,12,15,16)),"A",IF(OR(B14=4,5,6,7,8,9,10,11,13,14,21,40,41,42,43,44,45,46,47,50,51, 52,53,54,55,56,59,60),"B",IF(OR(B14=20,30,57,58),"C",IF(OR(B14=33,31,32,34,35,22),"E F OR G",IF(OR(B14=36),G,"ERROR")))))

View 4 Replies View Related

Combine 2 Functions Into 1

May 27, 2009

I tried to do a search for this but the search function was not working.

I have an excel sheet that I can scan Mac address into. The reason I created the sheet is because when I scan them in they are uppercase and do not have separators. I would like to combine 2 excel functions into 1

This one

=LOWER(C2)

and this one

=LEFT(E2,2)&":"&MID(E2,3,2)&":"&MID(E2,5,2)&":"&MID(E2,7,2)&":"&MID(E2,9,2)&":"&MID(E2,11,2)

View 2 Replies View Related

Nesting AND / IF And SUM Functions

Jul 11, 2014

I am trying to add up a specfic column in Excel based on the parameters or two different ones.

I.e If Col B is blank and Col D is 03 then add up the value in Col P

But I can't seem to work out how to do it, I have tried conditional sums and everything else I can think of, but it is still not working.

View 4 Replies View Related

Chart Functions

Mar 30, 2006

is there any way I can make the chart inputs variable. I have an array of numbers. lets say 100 of them, these are linked cells and depending on the input I might have less than 100 numbers in these 100 cells. All the cells which have numbers will appear in a block first and all the non number cells will appear below them as blanks in anotherblock. Now i have to create a chart from these numbers, so at times I have to take the 90 cells where there are numbers and other times I have to take 95 cells. Is there any way I can get over this.

View 9 Replies View Related

Vlookup & Right Functions In VBA

Aug 25, 2007

I'm trying to write a macro that looks up Column A so that each time it finds "Agent" as the first word in a cell, it takes that whole cell and copies it to another sheet.

I tried creating an array function that combines the If, Vlookup, and Right() and Left() functions, but no luck. Ideally, I would want this as a VBA macro.

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved