Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default If statement with some sort of lookup function

The table below is a lookup for significant timepoints for the parameters
P-x. A table elsewhere has headings relating to parameter name, and a
sequential time column, from 30 to 1440 minutes. The next column along needs
a "*" if the parameter and time match, empty if not.
This worked, but only for the last timepoint (so in the P-c table, for
example, I got a "*" at 1350 minutes, all other cells blank):

=IF(LOOKUP($B$53,stats_lookup!$J$2:$J$37,stats_loo kup!$K$2:$K$37)=A100,"*","")

Any ideas on how to fill every relevant timepoint for a given parameter
(also there may be no significant points for a given parameter).

thanks :-)


P-a 120
P-a 750
P-a 870
P-b 420
P-b 840
P-b 1230
P-b 1350
P-c 420
P-c 750
P-c 1230
P-c 1350
P-d 90
P-d 300
P-d 1080
P-e 60
P-e 150
P-e 240
P-e 330
P-e 870

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default If statement with some sort of lookup function

I've managed to come up with this by concatenating the parameter name and time;

=IF((VLOOKUP(($B$53&A56),stats_lookup!$P$39:$P$74, 1,FALSE)=($B$53&A56)),"*","")

which gives me "*" in the right places, but "#N/A" elsewhere. Any idea how
to get of the errors?


"foilfencingandy" wrote:

The table below is a lookup for significant timepoints for the parameters
P-x. A table elsewhere has headings relating to parameter name, and a
sequential time column, from 30 to 1440 minutes. The next column along needs
a "*" if the parameter and time match, empty if not.
This worked, but only for the last timepoint (so in the P-c table, for
example, I got a "*" at 1350 minutes, all other cells blank):

=IF(LOOKUP($B$53,stats_lookup!$J$2:$J$37,stats_loo kup!$K$2:$K$37)=A100,"*","")

Any ideas on how to fill every relevant timepoint for a given parameter
(also there may be no significant points for a given parameter).

thanks :-)


P-a 120
P-a 750
P-a 870
P-b 420
P-b 840
P-b 1230
P-b 1350
P-c 420
P-c 750
P-c 1230
P-c 1350
P-d 90
P-d 300
P-d 1080
P-e 60
P-e 150
P-e 240
P-e 330
P-e 870

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default If statement with some sort of lookup function

I'm sure this isn't very elegant, but seems to work:

=IF(ISERROR(IF((VLOOKUP(($B$53&A56),stats_lookup!$ P$39:$P$74,1,FALSE)=($B$53&A56)),"*","")),"","*")

"foilfencingandy" wrote:

I've managed to come up with this by concatenating the parameter name and time;

=IF((VLOOKUP(($B$53&A56),stats_lookup!$P$39:$P$74, 1,FALSE)=($B$53&A56)),"*","")

which gives me "*" in the right places, but "#N/A" elsewhere. Any idea how
to get of the errors?


"foilfencingandy" wrote:

The table below is a lookup for significant timepoints for the parameters
P-x. A table elsewhere has headings relating to parameter name, and a
sequential time column, from 30 to 1440 minutes. The next column along needs
a "*" if the parameter and time match, empty if not.
This worked, but only for the last timepoint (so in the P-c table, for
example, I got a "*" at 1350 minutes, all other cells blank):

=IF(LOOKUP($B$53,stats_lookup!$J$2:$J$37,stats_loo kup!$K$2:$K$37)=A100,"*","")

Any ideas on how to fill every relevant timepoint for a given parameter
(also there may be no significant points for a given parameter).

thanks :-)


P-a 120
P-a 750
P-a 870
P-b 420
P-b 840
P-b 1230
P-b 1350
P-c 420
P-c 750
P-c 1230
P-c 1350
P-d 90
P-d 300
P-d 1080
P-e 60
P-e 150
P-e 240
P-e 330
P-e 870

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need some comments on my Utility_Move class module. jchen Excel Worksheet Functions 0 August 21st 06 07:05 PM
Lookup function gives wrong values occasionally [email protected] Excel Discussion (Misc queries) 3 July 1st 06 12:58 AM
Help using lookup function Blackbird Excel Discussion (Misc queries) 9 December 19th 05 11:40 PM
Lookup function problem (kg) greencecil Excel Worksheet Functions 3 July 1st 05 04:54 PM
Data > Sort function amnesia? Dave D Excel Discussion (Misc queries) 1 November 29th 04 10:44 PM


All times are GMT +1. The time now is 10:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"