View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default What is wrong with this formula?

With the swap done, since you have a lot of irregular cols to return,
... need to pull the following columns: A, C, D, AI, AJ, AQ, AR, AY, AZ,
BG, BH, BO, BP, BW, BX, CE, CF, CM, CN, CU, CV, DC, DD, DK, DL.


one way is to use an incrementer for the col index part of the vlookup in
the startcell, say: COLUMN(B1)

The above simply returns 2 (ie the return col for the startcell), and then
increments accordingly: 3,4,5 ... as the startcell's formula is copied
across, giving us the corresponding returns from the other cols.

Try this slightly revised version in the startcell C1:
=IF(ISNA(MATCH($B1,'Liability Policy Expiration'!$A$6:$A$464,0)),0,
VLOOKUP($B1,'Liability Policy Expiration'!$A$6:$DN$464,COLUMN(B1),0))

C1 should return the cust name corresponding to the cust no. in B1. Then
just copy C1 right across to DL1, fill down as far as required to pull in
all the returns. "Clean up" by manually hiding the irrelevant cols between
cols C and DL that's not wanted.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Dan B" <dkbrim-at-yahoo-dot-com wrote in message
...
I will swap places with column A and B. That sounds like the easiest thing
to do. So Column A will now have the Customer Number and B will have the
customer name. So, in that case, how can I do this?