Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tim Tim is offline
external usenet poster
 
Posts: 408
Default VLOOKUP statement too long

I have the following statement, as it stands it works fine, but I would like
to expand on it and have it lookup three more cells. The problem is that
statement is then too long.
I was wondering if anyone had any suggestions on how to make the statement
shorter and still do what I need it to, or another way of accomplishing this.

=IF(ISNA(VLOOKUP(' Form 2'!R31,'Employee List'!F1:G132,2)),"",VLOOKUP(' Form
2'!R31,'Employee List'!F1:G132,2)) & CHAR(10) & CHAR(10) & "and further that
" & CHAR(10) & CHAR(10) &("2. ") &(' Form 2'!AF4&" "&' Form
2'!AY4&" "&' Form 2'!I4) & CHAR(10) & CHAR(10) &
IF(ISNA(VLOOKUP(' Form 2'!R32,'Employee List'!F1:G132,2)),"",VLOOKUP(' Form
2'!R32,'Employee List'!F1:G132,2)) & CHAR(10) & CHAR(10) & "and further that
" & CHAR(10) & CHAR(10) &("3. ") &(' Form2 '!AF4&" "&' Form
2'!AY4&" "&' Form 2'!I4) & CHAR(10) & CHAR(10) &
IF(ISNA(VLOOKUP(' Form 2'!R33,'Employee List'!F1:G132,2)),"",VLOOKUP(' Form
2'!R33,'Employee List'!F1:G132,2))

I would like to add:

& CHAR(10) & CHAR(10) & "and further that" & CHAR(10) & CHAR(10) &("4.
") &(' Form 2'!AF4&" "&' Form 2'!AY4&" "&' Form 2'!I4)
& CHAR(10) & CHAR(10) &
IF(ISNA(VLOOKUP(' Form 2'!R34,'Employee List'!F1:G132,2)),"",VLOOKUP(' Form
2'!R34,'Employee List'!F1:G132,2))
& CHAR(10) & CHAR(10) & "and further that" & CHAR(10) & CHAR(10) &("5.
") &(' Form 2'!AF4&" "&' Form 2'!AY4&" "&' Form 2'!I4)
& CHAR(10) & CHAR(10) &
IF(ISNA(VLOOKUP(' Form 2'!R35,'Employee List'!F1:G132,2)),"",VLOOKUP(' Form
2'!R35,'Employee List'!F1:G132,2))
& CHAR(10) & CHAR(10) & "and further that" & CHAR(10) & CHAR(10) &("6.
") &(' Form 2'!AF4&" "&' Form 2'!AY4&" "&' Form 2'!I4)
& CHAR(10) & CHAR(10) &
IF(ISNA(VLOOKUP(' Form 2'!R36,'Employee List'!F1:G132,2)),"",VLOOKUP(' Form
2'!R36,'Employee List'!F1:G132,2))


Thanks in advance


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default VLOOKUP statement too long

put parts of your formula on a hidden sheet in mulitple cells. Then use the
results to build your final output.

or, use defined names to produced major parts of your formula and combine
the results of the defined names (insert=Name=define).

--
Regards,
Tom Ogilvy

"Tim" wrote in message
...
I have the following statement, as it stands it works fine, but I would

like
to expand on it and have it lookup three more cells. The problem is that
statement is then too long.
I was wondering if anyone had any suggestions on how to make the statement
shorter and still do what I need it to, or another way of accomplishing

this.

=IF(ISNA(VLOOKUP(' Form 2'!R31,'Employee List'!F1:G132,2)),"",VLOOKUP('

Form
2'!R31,'Employee List'!F1:G132,2)) & CHAR(10) & CHAR(10) & "and further

that
" & CHAR(10) & CHAR(10) &("2. ") &(' Form 2'!AF4&" "&'

Form
2'!AY4&" "&' Form 2'!I4) & CHAR(10) & CHAR(10) &
IF(ISNA(VLOOKUP(' Form 2'!R32,'Employee List'!F1:G132,2)),"",VLOOKUP('

Form
2'!R32,'Employee List'!F1:G132,2)) & CHAR(10) & CHAR(10) & "and further

that
" & CHAR(10) & CHAR(10) &("3. ") &(' Form2 '!AF4&" "&' Form
2'!AY4&" "&' Form 2'!I4) & CHAR(10) & CHAR(10) &
IF(ISNA(VLOOKUP(' Form 2'!R33,'Employee List'!F1:G132,2)),"",VLOOKUP('

Form
2'!R33,'Employee List'!F1:G132,2))

I would like to add:

& CHAR(10) & CHAR(10) & "and further that" & CHAR(10) & CHAR(10) &("4.
") &(' Form 2'!AF4&" "&' Form 2'!AY4&" "&' Form 2'!I4)
& CHAR(10) & CHAR(10) &
IF(ISNA(VLOOKUP(' Form 2'!R34,'Employee List'!F1:G132,2)),"",VLOOKUP('

Form
2'!R34,'Employee List'!F1:G132,2))
& CHAR(10) & CHAR(10) & "and further that" & CHAR(10) & CHAR(10) &("5.
") &(' Form 2'!AF4&" "&' Form 2'!AY4&" "&' Form 2'!I4)
& CHAR(10) & CHAR(10) &
IF(ISNA(VLOOKUP(' Form 2'!R35,'Employee List'!F1:G132,2)),"",VLOOKUP('

Form
2'!R35,'Employee List'!F1:G132,2))
& CHAR(10) & CHAR(10) & "and further that" & CHAR(10) & CHAR(10) &("6.
") &(' Form 2'!AF4&" "&' Form 2'!AY4&" "&' Form 2'!I4)
& CHAR(10) & CHAR(10) &
IF(ISNA(VLOOKUP(' Form 2'!R36,'Employee List'!F1:G132,2)),"",VLOOKUP('

Form
2'!R36,'Employee List'!F1:G132,2))


Thanks in advance




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default VLOOKUP statement too long

Tim,
Can you describe what you are attempt to do - it appears to be
constructing a "message" - so we can see if there is better solution. One
problem with complex formula is that in the (not too distant) future it will
be difficult to recall/determine what you are trying to do.

What are the LOOKUP fields/Values?



"Tim" wrote:

I have the following statement, as it stands it works fine, but I would like
to expand on it and have it lookup three more cells. The problem is that
statement is then too long.
I was wondering if anyone had any suggestions on how to make the statement
shorter and still do what I need it to, or another way of accomplishing this.

=IF(ISNA(VLOOKUP(' Form 2'!R31,'Employee List'!F1:G132,2)),"",VLOOKUP(' Form
2'!R31,'Employee List'!F1:G132,2)) & CHAR(10) & CHAR(10) & "and further that
" & CHAR(10) & CHAR(10) &("2. ") &(' Form 2'!AF4&" "&' Form
2'!AY4&" "&' Form 2'!I4) & CHAR(10) & CHAR(10) &
IF(ISNA(VLOOKUP(' Form 2'!R32,'Employee List'!F1:G132,2)),"",VLOOKUP(' Form
2'!R32,'Employee List'!F1:G132,2)) & CHAR(10) & CHAR(10) & "and further that
" & CHAR(10) & CHAR(10) &("3. ") &(' Form2 '!AF4&" "&' Form
2'!AY4&" "&' Form 2'!I4) & CHAR(10) & CHAR(10) &
IF(ISNA(VLOOKUP(' Form 2'!R33,'Employee List'!F1:G132,2)),"",VLOOKUP(' Form
2'!R33,'Employee List'!F1:G132,2))

I would like to add:

& CHAR(10) & CHAR(10) & "and further that" & CHAR(10) & CHAR(10) &("4.
") &(' Form 2'!AF4&" "&' Form 2'!AY4&" "&' Form 2'!I4)
& CHAR(10) & CHAR(10) &
IF(ISNA(VLOOKUP(' Form 2'!R34,'Employee List'!F1:G132,2)),"",VLOOKUP(' Form
2'!R34,'Employee List'!F1:G132,2))
& CHAR(10) & CHAR(10) & "and further that" & CHAR(10) & CHAR(10) &("5.
") &(' Form 2'!AF4&" "&' Form 2'!AY4&" "&' Form 2'!I4)
& CHAR(10) & CHAR(10) &
IF(ISNA(VLOOKUP(' Form 2'!R35,'Employee List'!F1:G132,2)),"",VLOOKUP(' Form
2'!R35,'Employee List'!F1:G132,2))
& CHAR(10) & CHAR(10) & "and further that" & CHAR(10) & CHAR(10) &("6.
") &(' Form 2'!AF4&" "&' Form 2'!AY4&" "&' Form 2'!I4)
& CHAR(10) & CHAR(10) &
IF(ISNA(VLOOKUP(' Form 2'!R36,'Employee List'!F1:G132,2)),"",VLOOKUP(' Form
2'!R36,'Employee List'!F1:G132,2))


Thanks in advance


  #4   Report Post  
Posted to microsoft.public.excel.programming
Tim Tim is offline
external usenet poster
 
Posts: 408
Default VLOOKUP statement too long

Thanks Tom
I split the formula into two cells and then used a third cell to build it. I
then use data validation to call the third cell and paste the results where I
need it. Works the way I need it to.


"Tom Ogilvy" wrote:

put parts of your formula on a hidden sheet in mulitple cells. Then use the
results to build your final output.

or, use defined names to produced major parts of your formula and combine
the results of the defined names (insert=Name=define).

--
Regards,
Tom Ogilvy

"Tim" wrote in message
...
I have the following statement, as it stands it works fine, but I would

like
to expand on it and have it lookup three more cells. The problem is that
statement is then too long.
I was wondering if anyone had any suggestions on how to make the statement
shorter and still do what I need it to, or another way of accomplishing

this.

=IF(ISNA(VLOOKUP(' Form 2'!R31,'Employee List'!F1:G132,2)),"",VLOOKUP('

Form
2'!R31,'Employee List'!F1:G132,2)) & CHAR(10) & CHAR(10) & "and further

that
" & CHAR(10) & CHAR(10) &("2. ") &(' Form 2'!AF4&" "&'

Form
2'!AY4&" "&' Form 2'!I4) & CHAR(10) & CHAR(10) &
IF(ISNA(VLOOKUP(' Form 2'!R32,'Employee List'!F1:G132,2)),"",VLOOKUP('

Form
2'!R32,'Employee List'!F1:G132,2)) & CHAR(10) & CHAR(10) & "and further

that
" & CHAR(10) & CHAR(10) &("3. ") &(' Form2 '!AF4&" "&' Form
2'!AY4&" "&' Form 2'!I4) & CHAR(10) & CHAR(10) &
IF(ISNA(VLOOKUP(' Form 2'!R33,'Employee List'!F1:G132,2)),"",VLOOKUP('

Form
2'!R33,'Employee List'!F1:G132,2))

I would like to add:

& CHAR(10) & CHAR(10) & "and further that" & CHAR(10) & CHAR(10) &("4.
") &(' Form 2'!AF4&" "&' Form 2'!AY4&" "&' Form 2'!I4)
& CHAR(10) & CHAR(10) &
IF(ISNA(VLOOKUP(' Form 2'!R34,'Employee List'!F1:G132,2)),"",VLOOKUP('

Form
2'!R34,'Employee List'!F1:G132,2))
& CHAR(10) & CHAR(10) & "and further that" & CHAR(10) & CHAR(10) &("5.
") &(' Form 2'!AF4&" "&' Form 2'!AY4&" "&' Form 2'!I4)
& CHAR(10) & CHAR(10) &
IF(ISNA(VLOOKUP(' Form 2'!R35,'Employee List'!F1:G132,2)),"",VLOOKUP('

Form
2'!R35,'Employee List'!F1:G132,2))
& CHAR(10) & CHAR(10) & "and further that" & CHAR(10) & CHAR(10) &("6.
") &(' Form 2'!AF4&" "&' Form 2'!AY4&" "&' Form 2'!I4)
& CHAR(10) & CHAR(10) &
IF(ISNA(VLOOKUP(' Form 2'!R36,'Employee List'!F1:G132,2)),"",VLOOKUP('

Form
2'!R36,'Employee List'!F1:G132,2))


Thanks in advance





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
Long If Statement Michael Excel Worksheet Functions 5 July 21st 08 05:08 PM
IF statement too long, need another way Lady_Olara Excel Worksheet Functions 4 April 12th 06 10:28 AM
very long statement Frank Drost Excel Discussion (Misc queries) 0 January 18th 06 08:47 PM
Long IF Statement rmitchell87 Excel Discussion (Misc queries) 2 October 2nd 05 03:50 AM
long if statement LiSa Excel Programming 1 August 25th 04 08:25 PM


All times are GMT +1. The time now is 02:04 AM.

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

About Us

"It's about Microsoft Excel"