LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default VBA and VLOOKUP Question

Hi,

I'm working on a program which will calculate an inventory position at any
given date in the current year. I do not know how to stop using the VLOOKUP
function at one point of the program. The inventory data is for various
accounts. There are two groups of inventory data. A total of last year's
inventory totals grouped by Account Number is located on Sheet 1 of a
workbook. The second group of data is segmented by Account number/Order
Date/Purchase Date. It contains all the individual orders and purchaes for all
the accounts for the current year. It is located on Sheet 2.

I will arrive at an inventory total for any particular date by determining
how much inventory an account had during the previous year (Sheet1) and then
subtracting from that amount any orders from the current year and/or adding to
that amount any purchases made in the current year up to the desired date
(Sheet2). I will use the VLOOKUP function to go through a list of last year's
accounts to pull up last year's inventory total for a particular account.
However, I do not know how to code the program if an account has no inventory
at the end of the previous year. The program then has to exit the VLOOKUP part
of the program and get to the first transaction for that account in Sheet 2 and
start subtracting sales and adding purchases. So my question is, "If the
program cannot find any inventory for an account on Sheet 1, how do I code it
to leave the VLOOKUP function and start calculating transactions found on Sheet
2?"

Thanks

 
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
VLookUp Question Annie Excel Worksheet Functions 1 February 6th 10 11:00 PM
IF/AND VLOOKUP question... Kevin Excel Discussion (Misc queries) 3 December 16th 07 10:41 PM
VLookup question MrGator Excel Worksheet Functions 1 September 6th 07 06:36 PM
Vlookup question please Bob Newman Excel Worksheet Functions 3 March 17th 05 02:17 PM
vlookup question please Bob Newman Excel Worksheet Functions 1 March 17th 05 06:25 AM


All times are GMT +1. The time now is 10:58 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"