Please help me coding index and match in same columng.
sample
i have this in column C and D
1 A
2 B
3 C
4 D
5 E
and i want to have a macro code whichever i write something in column A result will be across
result
Column A
1 = A
3 = C
Thanks
Please help me coding index and match in same columng.
sample
i have this in column C and D
1 A
2 B
3 C
4 D
5 E
and i want to have a macro code whichever i write something in column A result will be across
result
Column A
1 = A
3 = C
Thanks
Last edited by ash3angel; 03-24-2015 at 12:43 AM.
Copy the below code and do right click on sheet tab and select view code and paste it.
Close the VBA window (Alt+Q to close VBA window) and return to that sheet and check.
![]()
Please Login or Register to view this content.
If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
Mark your thread as Solved
If the suggestion helps you, then Click *below to Add Reputation
Great codes, i really can't understand your codes
<>Sub code()
Dim i As Integer
For i = 1 To 5
If Cells(i, 1) = Cells(i, 6) Then
Cells(i, 1) = Cells(i, 7)
End If
Next
End Sub<>
Its perfect now, i just remove the offset formula. thanks
i don't understand what does target do and variant and using the application as formula
I used Worksheet Change Event.
The Target Refers to the Cell on which the Change Occurs.
Match() will result a number (if match found) or an error (if match is not found) so used a variant to hold both number and error value.
Used IsNumeric() to check whether its resulted a number if number then it will proceed further![]()
so many jargon word, i have not encountered the worksheet change event, i am self taught so i move slower learning all this. i am learning by coding what i think and if i can't answer it i ask help here. very thanks to this site and to you sharing your knowledge.
if im going to add new criteria i will add a word which says ***nothing as follows*** in the end of my first look up how can i do that?
Read the below links to know about events
http://www.ozgrid.com/VBA/run-macros-change.htm
http://www.excel-easy.com/vba/events.html
Please make the above sentence more descriptive![]()
i mean i want to add ***nothing as follows*** in the end of my statement.
Column A
result will be
A
B
C
***nothing as follows***
thanks for the reference
Replace the previous code with the below one
![]()
Please Login or Register to view this content.
Great, Thanks so much. i will practice the code you gave me.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks