Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Comparing Cell Value With A Reference
Hi, I thought I had found the solution but is doesn't work: I have a number of Cells which I have named and wish to check if th value = a result in another cell: for example: A1 contains the string "NED" In another sheet I have the country's name: Countries!A1 = "Nederland and the cellname, reference is NED so if I type in any other cell X1=NED the result = "Nederland" Now I have a soccerpool and a test the result is WINNERA In this cell is NED is the winner the value NED is selected What I need to know is how can I compa IF WINNERA = NED Then ...... Else ..... Thanks, as you may understand it's for the Soccer World Championship i Juni 2006 Hans:confused -- hhall Mal ----------------------------------------------------------------------- hhalle's Profile: http://www.excelforum.com/member.php...fo&userid=2082 View this thread: http://www.excelforum.com/showthread.php?threadid=49784 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Comparing Cell Value With A Reference
I may be missing the question here, but you should be able to do
=IF(WINNERA=NED,"y","n") -- HTH Bob Phillips (remove nothere from email address if mailing direct) "hhalle" wrote in message ... Hi, I thought I had found the solution but is doesn't work: I have a number of Cells which I have named and wish to check if the value = a result in another cell: for example: A1 contains the string "NED" In another sheet I have the country's name: Countries!A1 = "Nederland" and the cellname, reference is NED so if I type in any other cell X1=NED the result = "Nederland" Now I have a soccerpool and a test the result is WINNERA In this cell is NED is the winner the value NED is selected What I need to know is how can I compa IF WINNERA = NED Then ...... Else ..... Thanks, as you may understand it's for the Soccer World Championship in Juni 2006 Hans -- hhalle Male ------------------------------------------------------------------------ hhalle's Profile: http://www.excelforum.com/member.php...o&userid=20829 View this thread: http://www.excelforum.com/showthread...hreadid=497844 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Comparing Cell Value With A Reference
Hi Hans,
Not sure if I understand your question but it seems like it is for a worthy cause!!! ;-) If you have the following information in your Countries worksheet Col A Col B NED Netherlands < row 1 BRA Brazil MEX Mexico .... You get the drift. Then in your other sheet you can do a VLOOKUP function to return the name of the country based on the abbreviation. So for example if you have "NED" in Cell A1 you can use in A2 = VLOOKUP(A1,Countries!A1:B32,2,0). or in VBA wks.range("A2").formulaR1C1 = "=VLOOKUP(RC[-1],Countries!$A$1:$B$32,2,0)", where wks is a reference for the worksheet where you are working out your soccerpools. Is this what you mean?!? If this does not answer your question, please post more information in relation to your query... Regards, Ric |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Comparing Cell Value With A Reference
Function IsThisOne(IsDeze1 As String, IsDeze2 As String) As Integer IsThisOne = 0 If IsDeze1 < "" Then ttt = Range(IsDeze1).Value Else ttt = "" If ttt = IsDeze2 Then IsThisOne = 1 If ttt = "" Then IsThisOne = 0 End Function What I had was that the default value is "", when a team wins WINA = value of that team "NED" So now in WINA = NED it's 1 else it's 0 Thanks to Ric and Bob for thier suggestions but I think this works just fine, now let's hope NED wins?!? Regards, Hans -- hhalle Male ------------------------------------------------------------------------ hhalle's Profile: http://www.excelforum.com/member.php...o&userid=20829 View this thread: http://www.excelforum.com/showthread...hreadid=497844 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Nesting a sheet name reference within a cell reference??? | Excel Discussion (Misc queries) | |||
Comparing cell contents with different reference cells | Excel Worksheet Functions | |||
absolute cell reference A spreadsheet cell reference that does no | Excel Discussion (Misc queries) | |||
problem with cell reference in =sum(offset(cell reference,x,y,z,a)). Want cell ref to be variable. | Excel Worksheet Functions | |||
Problem with =sum(offset(cell reference,w,x,y,z). I want cell reference to be variable | Excel Worksheet Functions |