Hi people!
OKay... here's my problem:
I have 8 colomns.
Colomns A and B are empty, Colomns C and D all list countries, E and F are empty and G and H contain city names. Something like this:
A:
B:
C: US
D: UK
E:
F:
G: NYC
H: LONDON
(Vertical is of course horizontal)
Sheet 2 contains a list of locations in colomn A.
I need to make a macro that will take the location in colomn A (sheet 2) and look if the location is in colomn G OR H (sheet 1).
Now here's were is becomes tricky..
If location is found in colomn G (and not H) then copy colomn C of that row to colomn A / copy colomn D of that row to colomn B / copy G to E and copy H to F.
A: US
B: UK
C: (US)
D: (UK)
E: NYC
F: LONDON
G: (NYC)
H: (LONDON)
If however locataion is found in colomn H (and not G) then copy colomn C of that row to colomn B / Copy colomn D of that row to colomn A / G to F and copy H to E.
(So not B and A have switched around and so have E and F)
A: UK
B: US
C: (US)
D: (UK)
E: LONDN
F: NYC
G: (NYC)
H: (LONDON)
Any help would be appreciated
Thanks in advance!
Steven.
This message was edited by Steven123 on 2002-08-26 11:07
OKay... here's my problem:
I have 8 colomns.
Colomns A and B are empty, Colomns C and D all list countries, E and F are empty and G and H contain city names. Something like this:
A:
B:
C: US
D: UK
E:
F:
G: NYC
H: LONDON
(Vertical is of course horizontal)
Sheet 2 contains a list of locations in colomn A.
I need to make a macro that will take the location in colomn A (sheet 2) and look if the location is in colomn G OR H (sheet 1).
Now here's were is becomes tricky..
If location is found in colomn G (and not H) then copy colomn C of that row to colomn A / copy colomn D of that row to colomn B / copy G to E and copy H to F.
A: US
B: UK
C: (US)
D: (UK)
E: NYC
F: LONDON
G: (NYC)
H: (LONDON)
If however locataion is found in colomn H (and not G) then copy colomn C of that row to colomn B / Copy colomn D of that row to colomn A / G to F and copy H to E.
(So not B and A have switched around and so have E and F)
A: UK
B: US
C: (US)
D: (UK)
E: LONDN
F: NYC
G: (NYC)
H: (LONDON)
Any help would be appreciated
Thanks in advance!
Steven.
This message was edited by Steven123 on 2002-08-26 11:07