Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I have 4 Columns with thats information
A B C D
56 blank 950001 56
56 950002 57
57 950003 58
58 950004 60that macro have to search in column D the code and compare with column A, if exist then column C = B, for example:
A B C D
56 950001 950001 56
56 950001 950002 57
56 950001 950003 58
57 950004 59
and if not exist then "*******" in column B, for example,A B C D
56 950001 950001 56
56 950001 950002 57
57 950002 950003 60
58 ******* 950004 61
58 ******* 950005 62Please, somebody know how can I do That????
I apreciate your colaboration...

IN B
=IF(G11=TRUE,D11,"*******")
=IF(G12=TRUE,D12,"*******")
=IF(G13=TRUE,D13,"*******")
=IF(G14=TRUE,D14,"*******")
=IF(G15=TRUE,D15,"*******")
In E
=VLOOKUP(E11,B11:D15,1,FALSE)
=VLOOKUP(E12,B12:D16,1,FALSE)
=VLOOKUP(E13,B13:D17,1,FALSE)
=VLOOKUP(E14,B14:D18,1,FALSE)
=VLOOKUP(E15,B15:D19,1,FALSE)
In F
=ISNUMBER(F11)
=ISNUMBER(F12)
=ISNUMBER(F13)
=ISNUMBER(F14)
=ISNUMBER(F15)
For
56 950001 950001 56 56 TRUE
56 950002 950002 57 57 TRUE
57 ******* 950003 60 #N/A FALSE
58 ******* 950004 61 #N/A FALSE
58 ******* 950005 62 #N/A FALSE

Maybe it's because it's late and I'm tired but your examples don't seem to match your descriptions of what you want to do.
My interpretation is: you have a mixture of three and four column data.
If it is three column, you want to move B & C to C & D and make B=*******.
If it is in four column format you say C=B but most of your examples don't do this. In your first example B is blank so C=B would give you two blanks. You say "compare" D with A but you don't say why, just "if exist".What version of Excel are you using?
amethyst

![]() |
vtpciirq.pci pci.dll
|
Premiere and Matrox Marve...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |