Please Fix Lookup Formula

srizki

Well-known Member
Joined
Jan 14, 2003
Messages
1,860
Office Version
  1. 365
Platform
  1. Windows


<STYLE>st1\:* { BEHAVIOR: url(#ieooui)}</STYLE><STYLE>@font-face { font-family: Century Gothic;}@font-face { font-family: HGPSoeiKakugothicUB;}@font-face { font-family: @HGPSoeiKakugothicUB;}@page Section1 {size: 612.0pt 792.0pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin: 36.0pt; mso-footer-margin: 36.0pt; mso-paper-source: 0; }P.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; mso-fareast-font-family: HGPSoeiKakugothicUB; mso-style-parent: ""; mso-pagination: widow-orphan}LI.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; mso-fareast-font-family: HGPSoeiKakugothicUB; mso-style-parent: ""; mso-pagination: widow-orphan}DIV.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; mso-fareast-font-family: HGPSoeiKakugothicUB; mso-style-parent: ""; mso-pagination: widow-orphan}P { FONT-SIZE: 12pt; FONT-FAMILY: "Times New Roman"; mso-fareast-font-family: HGPSoeiKakugothicUB}SPAN.SpellE { mso-style-name: ""; mso-spl-e: yes}DIV.Section1 { page: Section1}</STYLE>
I need to use LOOKUP or INDEX&MATCH formual to bring matched values from column N to column AD, I am using this formula,

=IF(N2,"Presence","Presence",lookup(9.99999999999999e+307,SEARCH(N2,'[Lookup-Master-table.xls]Activity'!$D$2:$D$181).'[Lookup-Master-table.xls]Activity'!$E$2:$E$181)

What I want from this formula to do this, if there is word "Presence" in column N, put "Presence" in corresponding cell of column AD, other wise see Lookup_Master-table.
Lookup master does have Presence but that corresponds to any three digit number. Most of three digit numbers in column N have been converted to word Presence.

I need to adjust the above formula.

Thanks
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.


<STYLE>st1\:* { BEHAVIOR: url(#ieooui)}</STYLE><STYLE>@font-face { font-family: Century Gothic;}@font-face { font-family: HGPSoeiKakugothicUB;}@font-face { font-family: @HGPSoeiKakugothicUB;}@page Section1 {size: 612.0pt 792.0pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin: 36.0pt; mso-footer-margin: 36.0pt; mso-paper-source: 0; }P.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; mso-fareast-font-family: HGPSoeiKakugothicUB; mso-style-parent: ""; mso-pagination: widow-orphan}LI.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; mso-fareast-font-family: HGPSoeiKakugothicUB; mso-style-parent: ""; mso-pagination: widow-orphan}DIV.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; mso-fareast-font-family: HGPSoeiKakugothicUB; mso-style-parent: ""; mso-pagination: widow-orphan}P { FONT-SIZE: 12pt; FONT-FAMILY: "Times New Roman"; mso-fareast-font-family: HGPSoeiKakugothicUB}SPAN.SpellE { mso-style-name: ""; mso-spl-e: yes}DIV.Section1 { page: Section1}</STYLE>
I need to use LOOKUP or INDEX&MATCH formual to bring matched values from column N to column AD, I am using this formula,

=IF(N2,"Presence","Presence",lookup(9.99999999999999e+307,SEARCH(N2,'[Lookup-Master-table.xls]Activity'!$D$2:$D$181).'[Lookup-Master-table.xls]Activity'!$E$2:$E$181)

What I want from this formula to do this, if there is word "Presence" in column N, put "Presence" in corresponding cell of column AD, other wise see Lookup_Master-table.
Lookup master does have Presence but that corresponds to any three digit number. Most of three digit numbers in column N have been converted to word Presence.

I need to adjust the above formula.

Thanks
Did you mean to run:

=IF(N2,"Presence","Presence",lookup(9.99999999999999e+307,SEARCH('[Lookup-Master-table.xls]Activity'!$D$2:$D$181,N2),'[Lookup-Master-table.xls]Activity'!$E$2:$E$181)
 
Upvote 0
=IF(N2,"Presence","Presence",lookup(9.99999999999999e+307,SEARCH(N2,'[Lookup-Master-table.xls]Activity'!$D$2:$D$181,N2),'[Lookup-Master-table.xls]Activity'!$E$2:$E$181)

Looks like she had a period instead of a comma. Wouldn't she need a value to search, Alan? The N2?
 
Upvote 0
Thanks to both of you, yes I was missing N as Aladin and Exeltial mentioned, but I am missing a parenthesis, there are 3 open parenthesis and two closing. I am putting the last closing parenthesis at the end, )), but I am getting message that "you've entered too many arguments for this function.
to get...

Thanks
 
Last edited:
Upvote 0
Thanks to both of you, yes I was missing N as Aladin and Exeltial mentioned, but I am missing a parenthesis, there are 3 open parenthesis and two closing. I am putting the last closing parenthesis at the end, )), but I am getting message that "you've entered too many arguments for this function.
to get...

Thanks

Whoops. i didn't count the parens... We are also missing the = sgn, I guess. Does this...

=IF(N2="Presence","Presence",LOOKUP(9.99999999999999e+307,SEARCH('[Lookup-Master-table.xls]Activity'!$D$2:$D$181,N2),'[Lookup-Master-table.xls]Activity'!$E$2:$E$181))

work as needed?
 
Upvote 0
Aladin,

The formula is working exactly they way I wanted.
So if the look-up value is text we put in "quotes" and if this is text we use just comma?

Thank you Aladin, and by the way this lookup 9.9999 search formula I learned from you among other formulas that I learned from you, and it is nice to see that Bill Jelen acknowledged your help to others in his book.
 
Upvote 0
Aladin,

The formula is working exactly they way I wanted.
So if the look-up value is text we put in "quotes" and if this is text we use just comma?

Thank you Aladin, and by the way this lookup 9.9999 search formula I learned from you among other formulas that I learned from you, and it is nice to see that Bill Jelen acknowledged your help to others in his book.
You are welcome. Thanks for providing feedback.

Text like Presence...

1) can be put in a cell of its own, say, X2, and that cell can be used in formulas if appropriate, like in:

=LEFT(X2,3)

=VLOOKUP(X2,...)

=SUMIF(A2:F2,X2,A3:F3)

etc.

2) can directly used in formula like in:

=LEFT("Presence",3)

=VLOOKUP(Presence,...)

=SUMIF(A2:F2,"Presence",A3:F3)

etc.

Note. The foregoing assumes that Presence is not a name in Excel's name space, standing for something.
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,719
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top