Combine 2 if statements with vloookups [closed] - excel

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
I have searched everywhere but i can not find the answer i am looking for. I need to combine two formulas that both have if and vlookup statements in them. I can find answers on how to combine with if and vlookups singularly but not together. Does anyone know how i would combine these two formulas:
=IF(VLOOKUP(C7,'Drop Down Fields'!E4:I32,1,0)="Other",'ECO Form'!L30,"")
=IF(ISBLANK(C7),"",VLOOKUP(C7,'Drop Down Fields'!E4:I32,2))
Any help would be greatly appreciated.

Try this, let me know how you go:
=IF(C7="Other",'ECO Form'!L30,VLOOKUP(C7,'Drop Down Fields'!E4:I32,2))
I am not sure if you also care if "Other" must exist as an entry in the cell range E4:E32 on the 'Drop Down Fields' worksheet? If so, then you will need to use your original IF condition as it is from the first formula as below and the vlookup of 2nd formula simply gets plugged into the 'else' part of the first IF formula:
=IF(VLOOKUP(C7,'Drop Down Fields'!E4:I32,1,0)="Other",'ECO Form'!L30,VLOOKUP(C7,'Drop Down Fields'!E4:I32,2))

Related

Excel without VBA: How to create a sequential number following pattern from a column [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I have the following table:
I'd like to fill automatically the column with '001,002...' following the previous column. Please see the image to see the pattern (We'll have many in the future, it's crazy doing it manually)
I'm attching an example file: https://1drv.ms/x/s!Akmhm4db64ebrHQF9rlhwNUa7tdS?e=kUkFlV
Thank you!
Use TEXT and IF, like the following:
=TEXT(IF(A2<>A1,1,B1+1),"000")
Tested this formula in excel and it worked for me. Paste into cell B2 for your L4 code column and just copy down. As new items are added in column A, the pattern will repeat.
=IF(A2=A1,BASE(B1+1,10,3),BASE(1,10,3))
If you need to have it automatically populate to a predetermined row, drag the formula down (for example 1,000 rows) and use the following:
=IF(A2="","",IF(A2=A1,BASE(B1+1,10,3),BASE(1,10,3)))
Just for explanation purposes, what the formula is doing is looking at the previous item in column A and checking to see if it is the same as the current item, if yes, increment by 1, else start over at 1. The BASE function is adding the leading 0's.

How to extract specific ids [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
There is probably an easy way to do this. Just cant figure it out.
I have a huge dataset with multiple id:s that can have different code (column 2). How do I go about to extract by specific code "x" in this case and also extract all the ids that contains even one x. See image
From your screenshot it seems you are trying to filter IDs excluding code c. If I am correct then use below formula to E2 cell. If my assumption if wrong then please explain how your output is coming.
=IFERROR(INDEX($A$2:$B$12,AGGREGATE(15,6,(ROW($A$2:$A$12)-ROW($A$1))/($B$2:$B$12<>"c"),ROW(1:1)),COLUMN(A$1)),"")
Edit after clarification: Only for Office365 excel.
So, if you have Office365 excel then use below formula as per screenshot
E2=FILTER(A2:A12,ISNUMBER(MATCH(A2:A12,UNIQUE(FILTER(A2:A12,B2:B12="x")),0)))
F2=FILTER(B2:B12,ISNUMBER(MATCH(A2:A12,UNIQUE(FILTER(A2:A12,B2:B12="x")),0)))
If you do not have Office365 then you need to use combinations of few formulas by array entry which will slow your excel performance. Here is array formulas.
E2=IFERROR(INDEX($A$2:$A$12,AGGREGATE(15,6,(ROW($A$2:$A$12)-ROW($A$1))/(ISNUMBER(MATCH($A$2:$A$12,IF($B$2:$B$12="x",$A$2:$A$12,""),0))),ROW(1:1))),"")
F2=IFERROR(INDEX($B$2:$B$12,AGGREGATE(15,6,(ROW($A$2:$A$12)-ROW($A$1))/(ISNUMBER(MATCH($A$2:$A$12,IF($B$2:$B$12="x",$A$2:$A$12,""),0))),ROW(1:1))),"")
Press CTRL+SHIFT+ENTER to evaluate the formula as it is an array formula.

Counting and numbering range of text [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I am after a clever combination of Excel formulas that will be able to produce what I have manually typed into the yellow highlighted boxes on the screenshot.
What I need to produce is essentially, for the range of months on the far right column, to count each instance of it and order each one starting with 1 and incrementing by 1 until it changes to the next month.
Screeshot example
I'm wondering if someone has in their brain a nice combination of nested formulas or something similar ready to go they could enlighten me with?
Much appreciated.
I used column A for the range of Months starting from row 1. In B1 put 1
In B2 put =COUNTIF($A$1:A1,A2)+1 and drag down.

Excel | Adapt Hyperlink Formula [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
Iv'e searched and found here on Stackoverflow within a thread, a snippet of code posted by comment from user:1532334 which works perfectly for what I wish to achieve, but seek to adapt the ROW part of the formula to capture Coulmn1=Seq No instead of the row number and would appreciate some assistance.
Rows:
B1=Seq No, B2=code snippet as below, B3= Address
Code:
=(HYPERLINK(INDIRECT(ADDRESS(ROW(),COLUMN()+1)),"Link" & ROW()))
B2 Result= "Link" & B1
There might be a simpler way to do it than this, but I've used the ADDRESS and INDIRECT functions to reference the Column A value of the row the formula is in, similar to how you had the hyperlink address feeding in.
=(HYPERLINK(INDIRECT(ADDRESS(ROW(),COLUMN()+1)),"Link " & INDIRECT(ADDRESS(ROW(),1))))
When you find new formulas on the internet, try breaking them down and understanding how they work. You'll get pretty good at Excel in no time at all.

Excel formula - Compare two tables for values [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I need help setting up an Excel-Formula.
I have two tables that I need to compare in order to multiply the currency rate of table2 with the amount of table1 depending on the date of table1 matching the date field of table2.
If you have a look at the screenshot I made I think you will understand what I want to do: Image
Hope you can help me set up a formula for this. If you need the excel-file for testing I uploaded it to zoho. Link
This should do it:
=IF(ISNA(A3*INDEX($F$2:$H$13,MATCH(1,(B3=$G$2:$G$13)*(C3=$F$2:$F$13),0),3)),A3,A3*INDEX($F$2:$H$13,MATCH(1,(B3=$G$2:$G$13)*(C3=$F$2:$F$13),0),3))
Select your cell and put your cursor in the formula bar and press Ctrl+Shift+Enter
PS: thanks to RocketDonkey ;)
In the interest of showing various ways, here is alternative using SUMPRODUCT:
=A2*SUMPRODUCT(--($F$2:$F$13=C2),--($G$2:$G$13=B2),$H$2:$H$13)
If you wanted to handle 0 values differently, you could wrap everything in an IF statement.
=IF(A2*SUMPRODUCT(--($F$2:$F$13=C2),--($G$2:$G$13=B2),$H$2:$H$13)=0,
"Special stuff",
A2*SUMPRODUCT(--($F$2:$F$13=C2),--($G$2:$G$13=B2),$H$2:$H$13))

Resources