In the below Vllokup function.
I want to use a variable instead of using hard-coded value as "No Category"
=IF( ISNA( VLOOKUP(Param)),"No Category", IF(LEN(VLOOKUP(Param)) =0,"", VLOOKUP(Param) ))
I tried like the following way , unfortunately i can't make it.
=IF( ISNA( VLOOKUP(Param))," & VarCategory & ", IF(LEN(VLOOKUP(Param)) =0,"", VLOOKUP(Param) ))
Many Thanks
You can use a cell in your spreadsheet as a search box. For example, say you pick cell A1 as the box that can contain whatever you type into it. Your formula can then say:
=IF( ISNA( VLOOKUP(Param)), A1 , IF(LEN(VLOOKUP(Param)) =0,"", VLOOKUP(Param) ))
Now your VLOOKUP is no longer hard coded. It will look based on whatever is in cell A1.
Related
I have a value in the cell A1 that can be "PERSON, REGISTRATION,CONTRACT"
Then I have to add in the cell A2, an hyperlink to another spreadsheet:
If the value of cell A1 is PERSON go to spreadsheet2
If the value of cell A1 is REGISTRATION go to spreadsheet3
If thevalue of cell A1 isCONTRACT go to spreadsheet4
How can I do this please ?
Thank You -
Something like this:
=HYPERLINK("#'" & CHOOSE(MATCH(A3,{"person";"registration";"contract"},0),
"Sheet2","Sheet3","Sheet4" ) & "'!A1", "Go")
Edit: some explanation
MATCH(A3,{"person";"registration";"contract"},0) -finds the position of the value in A3 in the array of possible values.
Given that position, use CHOOSE() to pick the correct one from the three possible worksheet names to use in the hyperlink address.
The rest is just stringing all of that together to create the link formula.
Try this one:
=HYPERLINK("#"& LOOKUP(A1;{"contract";"person";"registration"};{"sheet4!";"sheet2!";"sheet3!"}) &"$a$1";"LINK to " & LOOKUP(A1;{"contract";"person";"registration"};{"sheet4!";"sheet2!";"sheet3!"}))
It is important the lookup_value must be in alphabetical order and you should be sort the lookup_vector accordingly.
I have the sheet, say "StackOverflow", and a value in cell A1, "Hello", that I want in my sheet "Test" at a specific cell.
I know that I could type ='StackOverflow'!A1 to get the cell value. The thing is that I do not always want to use the sheet "Stackoverflow" and instead want it to be like
=B1&!A1
where B1 holds a value that corresponds to a worksheet in my workbook.
How would you go about this?
You can use the INDIRECT function :
=INDIRECT("Stackoverflow!A1")
or
=INDIRECT(B1&"!A1")
=INDIRECT(B1 & "!" & A1)
Note that the above allows you to place any cell reference in A1.
If you want it to always refer to A1, then use
=INDIRECT(B1 & "!A1")
=INDIRECT(B1&"!"&A1) would do this.
I have a SUMIFS formula like this:
=SUM(SUMIFS(DATA!A1: A5000", .. others conditions .., DATA!R1:R5000,"{<=2017/06/05"," "}) this works great, but we need
to replace the date with a cell reference.
Something like this: "{<=E12"," "}.
We can't change SUMIFS since this is not allowed by the client.
Try this, Concat the text with cell using &
=SUM(SUMIFS(DATA!A1:Z5000", ... , DATA!R1:R5000,"{<=" & E12 ," "})
=SUMPRODUCT(SUMIFS(DATA!A1:A5000,DATA!R1:R5000,CHOOSE({1,2},"<="&E12," ")))
Regards
Ok. I'm Having A Problem With A formula That Seems Really Basic. It Uses The If Function. Here's What I Need.
If(b2:b50<>"",IF(b2:b50"607734",e2:e50="Patriot"))
So Basically If Between b2-b50 Has The Number "607734" I Want e2-e50 To Display "Patriot"
You need to put the IF statement in the cell where you want the value. For example, in E2, enter =IF(B2="607734", "Patriot", "") and drag it down to E50.
For each cell you have to enter the formula, which goes like this.
If(logical_test,value if true, value if false)
So, if b2 =607734 then c2 = "Patriot" else c2= " "
Now as formula we can write this as
if(b2=607734,"Patriot","")
similarly, for other cells(c3,c4,c5,c6....c50) we have formula in each cell as :
if(b3=607734,"Patriot","")
if(b4=607734,"Patriot","")
if(b5=607734,"Patriot","")
if(b6=607734,"Patriot","")
........
........
if(b50=607734,"Patriot","")
Your IF statements don't satisfy the else conclusion.
The format of an IF statement in Excel is as follows:
IF(parameter, what to do if parameter is true, what to do if parameter is false).
Right now you've filled in the first two variables for the IF command, but you left the third blank.
e.g.
Could have:
If(b2:b50<>"",IF(b2:b50"607734",e2:e50="Patriot", " ")," ")
And in that case it would put a space in the cell if the first two conditions are not met.
i want to get the last value after / in excel.
www.google.com/new/oldpage.php
www.google.com/new/hello/wright.html
www.facebook.com/face/newface/demo.php
from the above link i want to separate the pagename
for eg. from 1 url output should be www.google.com/new/ 2nd www.google.com/new/hello/ and so
i used RIGHT formula but we can define only static. pls. provide if any one has the solution.
If A1 is www.google.com/new/oldpage.php, use this code to get www.google.com/new/:
=LEFT( A1, FIND( "|", SUBSTITUTE( A1, "/", "|", LEN(A1)-LEN(SUBSTITUTE(A1,"/","")) ) ) )
Use this code to get oldpage.php:
=RIGHT(A1,LEN(A1)-FIND("|",SUBSTITUTE(A1,"/","|",LEN(A1)-LEN(SUBSTITUTE(A1,"/","")))))
As you can see, you need to SUBSTITUTE some chars before calling the FIND method.
Depending on your regional options, you must change "," (comma) in the formula for ";" (semicolon).
Use this formula,
=MID(A16,SEARCH("^^",SUBSTITUTE(A16,"/","^^",LEN(A16)-LEN(SUBSTITUTE(A16,"/",""))))+1,999)
Excel doesn't provide a formula for reverse string searches so the following must be used
=IF(ISERROR(FIND("/",A1)),A1,RIGHT(A1,LEN(A1)-FIND("~",SUBSTITUTE(A1,"/","~",LEN(A1)-LEN(SUBSTITUTE(A1,"/",""))))))