Search for a values in 2 sheets using macro

Closed
priya - Jun 17, 2011 at 06:43 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Jun 23, 2011 at 12:03 PM
Hi,

I have Response XMl Schema from 2 different environment of an application in sheet1 and sheet2 on the msexcel . I have a collection of xml tags in sheet3.

I want to write a macro which do the following
(e.g)

<State>TN</State>
<Country>INDIA</Country>
............
etc.......


1. I have to select the xml tag(Country) from sheet3 .
2. goto sheet 1 and search whether the Tag is displayed in the Response XMl Schema for the 1st environment.
3. then goto sheet 2 and search whether the Tag is displayed in the Response XMl Schema for the 2nd environment.
4. update the Tag name and status (i.e tag is present) in a new sheet4.


Can anyone please help me out to write a macro to perform the above activity.



Thanks,
Priya.
Related:

1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Jun 17, 2011 at 01:15 PM
wont you have multiple <country></country> tags in your xml ?
yes . There may be multiple transactions in the response, All transaction may or may not have tags. I have to validate these set of tags are present in atleast 1 transaction.
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Jun 22, 2011 at 05:06 PM
Well if it is an XML doc why not just parse it ?
Also would your document be a proper xml and each tag would have an appropriate closing tag in the right nest
Its not a xml document ...

This is basically, XML responses of a service which is run on 2 different environments.

Each tag will have a appropriate closing tag in the nest.

I have extracted the responses in to a excel sheet from 2 environments to validate whether the correct responses are received on both the environments.

To validate the responses, I have a list of required tags( like state, zipcode, city etc) within an transaction should be present.
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Jun 23, 2011 at 12:03 PM
Could you post a sample workbook at some shared site