View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
yord yord is offline
external usenet poster
 
Posts: 2
Default Comparing data (conditionally) between two spreadsheets

On Sep 22, 2:38*pm, Joel wrote:
Is there a way of determining which is the first column in sheet B? *Is there
a header in the column or row a\the will determine where the data is located.
*the task isn't too hard once we know the start location. *Can we use a
inputbox to determine the 1st cell?

"yord" wrote:
Hi, I'm hoping someone can help me with the following scenario.


Spreadsheet A has the following (always in Column A)


NCNTPASH1AP136
CUSNPRSJ1AP11
NJANPRSJ1AP03
JANBVSJ9798RR023


Spreadsheet B has the following (not always in the same columns but
always located next to each other. So, they could be column A and B
one week or column B and C the next.)


NCNTPASH1AP136 * * Ordered
NJANPRSJ1AP11 * * *In Inventory
NJANPRSJ1AP03 * * *In Inventory
JANPRSJ9798RR001 * Deployed


Spreadsheet A's column is not titled, it's simply a list of server
names. Spreadsheet B has column names (a 9 Mb dump from a Remedy
database) and they are always ("CI Name" and "Status").


I'm interested in comparing server names in Spreadsheet A to those
that are in Spreadsheet B but only if they are marked "Deployed." Does
that make sense? I need to know which server names are common to both
spreadsheets and which servers are unique to each. Can someone help me
solve this both by using Excel's built-in functions as well as with a
VB script? I ask this because I genuinely want to understand and learn
this for myself. Thank you so much for any time and consideration you
can afford.


Spreadsheet (workbook) A does not have a column header, thus the
starting cell will always be A1. Spreadsheet (a separate workbook) B
always has a header but currently holds within columns B and C (B2 and
C2 respectively). The column locations may change but it's not a big
deal since I can always modify the spreadsheet manually to accommodate
the script or vice versa. Therefore, it may not be important for the
script to know about the header names contained in Spreadsheet B ("CI
Name" and "Status"). I simply mentioned them in the hopes that a
script could search any two columns based on the header name rather
than column location. Does that make sense?