Thanks:  0
Likes:  0

1. i have the following example

Column A Column B

a1: Yankees b1: 10
a2: Mets b2: 20
a3: Dodgers b3: 30

vlookup on the dodgers - 2nd column will return 30 - but what if want the cell directly above (20). is there a formula?

thanks

2. You could try
=OFFSET(\$A\$1,MATCH("dodgers",\$A\$1:\$A\$3,0)-2,1)

What results would you expect if Yankees were entered? this will give you a #ref! error.

3. On 2002-04-22 13:42, mcarter973 wrote:
i have the following example

Column A Column B

a1: Yankees b1: 10
a2: Mets b2: 20
a3: Dodgers b3: 30

vlookup on the dodgers - 2nd column will return 30 - but what if want the cell directly above (20). is there a formula?

thanks
=INDEX(B1:B100,MATCH(E1,A1:A100,0)-2)

where A1 houses a lookup value like "dodgers".

You'll get an error though when the lookup value matches a value in A1 or A2.

Just curious: Is there a particular reason for why you want it this way?

4. i am using the calendar month end date as opposed to the last working date. for example, march 28 is the last business day but march 31 is the last business day. currently, vlookup will look up the the last workday (including holidays)and subtract 1. this works for all days except when the calendar month end falls on a weekend or holiday.

with the dates in column A, i would like to lookup the dates in column A and grab the date in the cell directly above. for example, if B1 houses the lookup value March 31, i want to find March 31 in column A and grab the cell above which is March 27.

5. You may want to try manipulate your date with something like
=WORKDAY(B1,(MAX(WEEKDAY(B1,2)>5,COUNTIF(holiday,B1)))*-1,holiday)-1

where "holiday" is a named list of your holidays. this could be used as the lookup term in vlookup.

workdays requires the analyst tool pak to be installed.

## User Tag List

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•