Excel match string 2 values verify on a range [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 9 years ago.
Improve this question
I want to verify if a name like C1"hans" c2 "mueller" is present on a Range also with "firstname" "lastname" in each field.
I tried this formula:
=IF(COUNTIF(sheet2!$D:$E;D2:E2);"Yes";"No")
But this just works for one field like
=IF(COUNTIF(sheet2!$D:$E;D2:D2);"Yes";"No")
Please help me to get the two values verified if it is present on the database.

I think what you're looking for is COUNTIFS (2007+):
=IF(COUNTIFS(sheet2!$D:$D;D2;sheet2!$E:$E;E2)>0;"Yes";"No")
Backwards compatible would be SUMPRODUCT, but you don't want to use whole columns with sumproduct, so adjust ranges to suit:
=IF(SUMPRODUCT(--(sheet2!$D$1:$D$100=D2);--(sheet2!$E$1:$E$100=E2))>0;"Yes";"No")

You may be getting the criteria paramater of the COUNTIF function incorrect? I believe you are trying to see if values in C1, C2, etc. occur in columns D and E?
If so, then you'd want to change your formula to:
=IF(COUNTIF(Sheet2!$D:$E,C1),"Yes","No")
Which would tell you if the value in C1 occurs in either column D or E.

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.

excel: How do I run my VLookup formula only if certain criteria is met? [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 want to create a formula that checks if there is a name above it before it returns a number from the table.
For example, when I put 4180 under PAUL in Cell D33; cells E33:I33 will show 200. In my example below, for Level 4, there isn't a name but a number is still showing in cell I38. I do not want it to display a number.
I tried to use Vlookup function, but do not know how to make cell blank when there is no name.
You can use the functions =IF and =ISTEXT OR =ISBLANK to check if a name is populated. If a name is populated you can have it run your Vlookup formula to pull the numbers from the table.
=If(ISTEXT(D2)=TRUE,VLOOKUP(.....),"")
Where D2 is referencing the cell above to check for a name and the Vlookup formula is to check your table.
This statement is saying if the above cell has text, run the Vlookup formula, if false, leave the cell blank.
Here are my results.
=If(ISTEXT(D2)=TRUE,VLOOKUP($C$3,$J$2:$O$5,2,FALSE),"")
enter image description here

Excel need to match and paste to an adjacent cell [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 6 years ago.
Improve this question
So the formula needs to look at column D IN SHEET 1, go over to sheet 2, if it finds a match in column A, then paste the coordinates in column B into sheet 1 column E.IMAGE
As suggested by #Jeeped, you may use Excel Worksheet VLOOKUP() function: enter the following Formula into Cell "E2" of the first Worksheet("Sheet1"):
=VLOOKUP(D2,Sheet2!A:B,2,FALSE)
and extend it down to the last row with data in Column D. Hope this may help.
There are a couple of options on how to do it. As jeeped pointed out the VLOOKUP is a great choice for this layout. Alex's answer has the formula looking at the entire A and B column so you may want to edit that to match the rows of data you have. Another way of doing that automatically is
=vlookup(D2,offset(sheet2!$A$1,0,0,counta(sheet2!A:A),2),2,0)
Another method which could be more versatile if your data is layed out differently is:
=index(offset(sheet2!$A$1,0,1,counta(sheet2!A:A),1),match(D2,offset(sheet2!$A$1,0,0,counta(sheet2!A:A),1),0)-1)
Heck I think even the following would work in your case
=offset(sheet2!$A$1,match(D2,offset(sheet2!$A$1,0,0,counta(sheet2!A:A),1),0)-1,1,1,1)

Match next-highest value in Excel table [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 8 years ago.
Improve this question
I'm trying to automate a bit one of my Excel sheets.
I have the following structure:
The value on A2 is higher than A5 and lower than A6. Therefore, B2 should be equal to "Y" (B6). If A2 was equal to 101.000, then B2 should be equal to "A" (B15).
Is there a formula to do that?
Assuming that the F was a typing mistake and that you meant A instead, you can use INDEX and MATCH in the following way:
=INDEX(B5:B19,MATCH(A2,A5:A19)+1)
Note: if you have a value above the highest number or below the lowest number, you will get an error, and since you didn't mention anything about those cases, I won't include a workaround for those, but if you can have such situations, let me know and I'll add the workaround(s).

COUNTA and INDIRECT together [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 8 years ago.
Improve this question
Any help would be appreciated. I have seen the indirect formula used a lot but I'm not sure if I can string together all that I am trying to do here.
I have created within the X column of SS Sales a formula that calculates the data range based on install dates. So 1/1/13 to 4/1/13 may equal (DT14:BL41). The X column gives me this answer depending on dates that change.
I need to use the range determined by cell X2 in SS Sales(DT14:BL41) in a COUNTA formula to count what is actually open on the calendar, which is on a separate sheet within the same workbook.
This is what I am trying but it doesn't work:
=COUNTA('install calendar copy'!(INDIRECT('SS Sales'!X2))
You need 'SS Sales'!X2 to contain the text string 'install calendar copy'!DT14:BL41 then =COUNTA(INDIRECT('SS Sales'!X2)) should give you what you want.

Resources