Can someone help me how to do this. I started something but cant figure out myself 100%.
In have in SHT-1 columns A & B, C D, .
Column A-
B-Ident Number
C-Description …
D- ..
In SHT-2 I have :
A - ..
B -
C- Ident Number
D-
E-
F- Description
I want periodically to update in SHT-1 the column C-Description based on the Ident Number from the SHT-2. the second SHT-2 doesn’t contain all Ident numbers what SHT-1 has.
I’d like to put in SHT-1 in temporary unused column X all values: VLOOKUP(B1, SHT-2!C100:F1000, 4, FALSE)
If the Ident number was found , copy to column C, and if it wasn’t found in SHT-2, just to leave same field value what was already there in SHT-1.
So, I really don’t use the formula in spreadsheet in SHT-1, the cell B is not protected in SHT-1.
VSB program in SHT-1:
lastRowColA = Range("A65536").End(xlUp).Row
counter = 0
Do While counter < lastRowColA
counter = counter + 1
Range("X" & counter).Select
‘ Vlookup(B1, Sht-2!C10:F1000, 4, False) I am not sure about syntax right)’
‘ Enter the value in field X’
‘ IF the value in sht-was found,
copy the X field in C field ‘
ELSE
Don’t do anything , go to next field
Endif
Loop
What would be the real code for this?
In have in SHT-1 columns A & B, C D, .
Column A-
B-Ident Number
C-Description …
D- ..
In SHT-2 I have :
A - ..
B -
C- Ident Number
D-
E-
F- Description
I want periodically to update in SHT-1 the column C-Description based on the Ident Number from the SHT-2. the second SHT-2 doesn’t contain all Ident numbers what SHT-1 has.
I’d like to put in SHT-1 in temporary unused column X all values: VLOOKUP(B1, SHT-2!C100:F1000, 4, FALSE)
If the Ident number was found , copy to column C, and if it wasn’t found in SHT-2, just to leave same field value what was already there in SHT-1.
So, I really don’t use the formula in spreadsheet in SHT-1, the cell B is not protected in SHT-1.
VSB program in SHT-1:
lastRowColA = Range("A65536").End(xlUp).Row
counter = 0
Do While counter < lastRowColA
counter = counter + 1
Range("X" & counter).Select
‘ Vlookup(B1, Sht-2!C10:F1000, 4, False) I am not sure about syntax right)’
‘ Enter the value in field X’
‘ IF the value in sht-was found,
copy the X field in C field ‘
ELSE
Don’t do anything , go to next field
Endif
Loop
What would be the real code for this?