Syntax for IF THEN LOOKUP Formula

DH888

Board Regular
Joined
Jul 15, 2015
Messages
147
I'm trying to get this formula to work

=IF<gs id="5461d56c-5950-4f91-9baa-9b56a75f907c" ginger_software_uiphraseguid="77d9f4c7-ac77-48b5-a140-55f4b681acf1" class="GINGER_SOFTWARE_mark">(</gs>((LOOKUP<gs id="89f5118e-7bd1-4de8-b39f-6a37284babd3" ginger_software_uiphraseguid="77d9f4c7-ac77-48b5-a140-55f4b681acf1" class="GINGER_SOFTWARE_mark">(</gs>2,1/(P5<gs id="c91407af-fe6d-4641-9631-3523941496ab" ginger_software_uiphraseguid="77d9f4c7-ac77-48b5-a140-55f4b681acf1" class="GINGER_SOFTWARE_mark">:</gs>P35<>"")<gs id="35cb9ff3-15d1-467c-bef4-de9dcadc7dca" ginger_software_uiphraseguid="77d9f4c7-ac77-48b5-a140-55f4b681acf1" class="GINGER_SOFTWARE_mark">,</gs>P5<gs id="e68ed770-7336-4862-98a9-e6f537b12b02" ginger_software_uiphraseguid="77d9f4c7-ac77-48b5-a140-55f4b681acf1" class="GINGER_SOFTWARE_mark">:</gs>P35))""),""<gs id="4752ae0d-f315-4cc0-9251-5d116e628d21" ginger_software_uiphraseguid="77d9f4c7-ac77-48b5-a140-55f4b681acf1" class="GINGER_SOFTWARE_mark">,</gs>LOOKUP<gs id="cd017937-5316-47a1-b853-1966d3288d86" ginger_software_uiphraseguid="77d9f4c7-ac77-48b5-a140-55f4b681acf1" class="GINGER_SOFTWARE_mark">(</gs>2,1/(P5<gs id="806d19ac-b220-4a3f-a6cf-16b7ac779d1a" ginger_software_uiphraseguid="77d9f4c7-ac77-48b5-a140-55f4b681acf1" class="GINGER_SOFTWARE_mark">:</gs>P35<>"")<gs id="d173896f-d8a5-4e33-bca1-56b2fce8bf74" ginger_software_uiphraseguid="77d9f4c7-ac77-48b5-a140-55f4b681acf1" class="GINGER_SOFTWARE_mark">,</gs>P5<gs id="4aca2364-85bb-460c-8e59-5c51e8c6c067" ginger_software_uiphraseguid="77d9f4c7-ac77-48b5-a140-55f4b681acf1" class="GINGER_SOFTWARE_mark">:</gs>P35)
in cell P36 at the bottom of the YTD column

2OP
3
4
Daily Over/ShortMTD Cash
6$5.00$5.00
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36=IF<gs id="6621a8fe-5f11-49c4-8abe-43b17a34241a" ginger_software_uiphraseguid="10052bbc-4571-424c-98ee-e58f362b8530" class="GINGER_SOFTWARE_mark"><gs id="96b1d408-dc19-44b3-951e-79be55c4e29a" ginger_software_uiphraseguid="63eb24ed-63d4-4529-a4ac-8b69ec62d8bb" class="GINGER_SOFTWARE_mark">(</gs></gs>(LOOKUP<gs id="558b0b8d-8e03-4185-add4-c44f140c4de8" ginger_software_uiphraseguid="10052bbc-4571-424c-98ee-e58f362b8530" class="GINGER_SOFTWARE_mark"><gs id="a63b56ba-7f09-4646-8862-de0f8c1624a6" ginger_software_uiphraseguid="63eb24ed-63d4-4529-a4ac-8b69ec62d8bb" class="GINGER_SOFTWARE_mark">(</gs></gs>2,1/(P5<gs id="793763ca-dd04-425c-b007-3af533727727" ginger_software_uiphraseguid="10052bbc-4571-424c-98ee-e58f362b8530" class="GINGER_SOFTWARE_mark"><gs id="6bf55182-d019-4069-99c7-4875097a5f21" ginger_software_uiphraseguid="63eb24ed-63d4-4529-a4ac-8b69ec62d8bb" class="GINGER_SOFTWARE_mark">:</gs></gs>P35<>"")<gs id="b311a5cf-2c1f-4fc2-a956-394249326f3f" ginger_software_uiphraseguid="10052bbc-4571-424c-98ee-e58f362b8530" class="GINGER_SOFTWARE_mark"><gs id="91634331-455b-4f13-afa1-3a6fffa9cba1" ginger_software_uiphraseguid="63eb24ed-63d4-4529-a4ac-8b69ec62d8bb" class="GINGER_SOFTWARE_mark">,</gs></gs>P5<gs id="84cf09ff-a623-46b2-b985-5f7e89607757" ginger_software_uiphraseguid="10052bbc-4571-424c-98ee-e58f362b8530" class="GINGER_SOFTWARE_mark"><gs id="f56e9972-db19-4fcf-ab22-0ed3e3d010ee" ginger_software_uiphraseguid="63eb24ed-63d4-4529-a4ac-8b69ec62d8bb" class="GINGER_SOFTWARE_mark">:</gs></gs>P35),"","")<gs id="b88adcce-fc61-4351-b361-b39d613b3d77" ginger_software_uiphraseguid="10052bbc-4571-424c-98ee-e58f362b8530" class="GINGER_SOFTWARE_mark"><gs id="fbada0d6-d415-40a2-8596-70c5cbad5972" ginger_software_uiphraseguid="63eb24ed-63d4-4529-a4ac-8b69ec62d8bb" class="GINGER_SOFTWARE_mark">,</gs></gs>(LOOKUP<gs id="72b4c5b0-94dc-48b8-b08f-5ffa469d4151" ginger_software_uiphraseguid="10052bbc-4571-424c-98ee-e58f362b8530" class="GINGER_SOFTWARE_mark"><gs id="6f3962d5-8fd5-4760-8805-09bad3e7edcf" ginger_software_uiphraseguid="63eb24ed-63d4-4529-a4ac-8b69ec62d8bb" class="GINGER_SOFTWARE_mark">(</gs></gs>2,1/(P5<gs id="a225f61c-ac4b-44d2-ba07-0134ee4c346e" ginger_software_uiphraseguid="10052bbc-4571-424c-98ee-e58f362b8530" class="GINGER_SOFTWARE_mark"><gs id="eaa2a807-0a76-4385-ac2b-ea960c2f085a" ginger_software_uiphraseguid="63eb24ed-63d4-4529-a4ac-8b69ec62d8bb" class="GINGER_SOFTWARE_mark">:</gs></gs>P35<>"")<gs id="13192c00-de36-4103-9658-e561a182b660" ginger_software_uiphraseguid="10052bbc-4571-424c-98ee-e58f362b8530" class="GINGER_SOFTWARE_mark"><gs id="8c8078be-44b7-4e67-b300-16a3db7d514e" ginger_software_uiphraseguid="63eb24ed-63d4-4529-a4ac-8b69ec62d8bb" class="GINGER_SOFTWARE_mark">,</gs></gs>P5<gs id="bf113cae-c7ab-4f3f-987b-4975846995d0" ginger_software_uiphraseguid="10052bbc-4571-424c-98ee-e58f362b8530" class="GINGER_SOFTWARE_mark"><gs id="8e9fd99c-9fd7-4073-9dff-154bd03c6c28" ginger_software_uiphraseguid="63eb24ed-63d4-4529-a4ac-8b69ec62d8bb" class="GINGER_SOFTWARE_mark">:</gs></gs>P35))

<tbody>
</tbody>




















































Currently it's just saying the formula contains an error
Thanks in advance for your help
 
Last edited:

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
If you are looking for the last numeric value in P5<gs class="GINGER_SOFTWARE_mark" id="c91407af-fe6d-4641-9631-3523941496ab" style="background-color: transparent; color: rgb(51, 51, 51); font-family: Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;" ginger_software_uiphraseguid="77d9f4c7-ac77-48b5-a140-55f4b681acf1">:</gs>P35, try...

=IFERROR(LOOKUP(9.99999999999999E+307,P5<gs class="GINGER_SOFTWARE_mark" id="c91407af-fe6d-4641-9631-3523941496ab" style="background-color: transparent; color: rgb(51, 51, 51); font-family: Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;" ginger_software_uiphraseguid="77d9f4c7-ac77-48b5-a140-55f4b681acf1">:</gs>P35),"no number")

If you are looking for last text value in P5<gs class="GINGER_SOFTWARE_mark" id="c91407af-fe6d-4641-9631-3523941496ab" style="background-color: transparent; color: rgb(51, 51, 51); font-family: Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;" ginger_software_uiphraseguid="77d9f4c7-ac77-48b5-a140-55f4b681acf1">:</gs>P35, try...


=IFERROR(LOOKUP(REPT("z",255),P5<gs class="GINGER_SOFTWARE_mark" id="c91407af-fe6d-4641-9631-3523941496ab" style="background-color: transparent; color: rgb(51, 51, 51); font-family: Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;" ginger_software_uiphraseguid="77d9f4c7-ac77-48b5-a140-55f4b681acf1">:</gs>P35),"no text")


If you are looking for any last value in P5<gs class="GINGER_SOFTWARE_mark" id="c91407af-fe6d-4641-9631-3523941496ab" style="background-color: transparent; color: rgb(51, 51, 51); font-family: Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;" ginger_software_uiphraseguid="77d9f4c7-ac77-48b5-a140-55f4b681acf1">:</gs>P35, try...


=IFERROR(LOOKUP(9.99999999999999E+307,1/P5<gs class="GINGER_SOFTWARE_mark" id="c91407af-fe6d-4641-9631-3523941496ab" style="background-color: transparent; color: rgb(51, 51, 51); font-family: Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;" ginger_software_uiphraseguid="77d9f4c7-ac77-48b5-a140-55f4b681acf1">:</gs>P35,P5:P35),"no value")


 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,566
Messages
6,125,589
Members
449,237
Latest member
Chase S

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