Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VLOOKUP
Hi I am using the following code
If Len(Trim(.GetText(mainloop, 57, 10))) 0 Then Range("a4").Offset(CrashLoopTest + reccounter, 0).Value = Trim(.GetText(mainloop, 57, 10)) CrashLoopTest = CrashLoopTest + 1 End If to Check if the length of a string (with its trailing and leading spaces removed) is larger than 0, get the string if it is and write it to cell a4 incrementing the value of recounter (which is a cell) by the value of 1. This is part of the Crashloop process. I have created another field on the sheet and require the following code to be added to the above but arent sure where to put it or if it will need changing to allow it to work. =VLOOKUP(RIGHT(A4,2), Values!$A1:$B104,2,FALSE) This is what i am manually having to add to each cell when the MainLoopTest process has finished for each row. I realise I need to interupt the mainlooptest process and take out the = from the VLOOKUP statement. Any Help much appreciated. btw... I had thought of putting it in as you see below but it just spits out erorrs saying invalid characters ($) and then requests a list seperator. Is this because I would use the VLOOKUP function in a different way in the script rather than on the sheet? If Len(Trim(.GetText(mainloop, 57, 10))) 0 Then Range("a4").Offset(CrashLoopTest + reccounter, 0).Value = Trim(.GetText(mainloop, 57, 10)) VLOOKUP(RIGHT(A4,2), Values!$A1:$B104,2,FALSE) CrashLoopTest = CrashLoopTest + 1 End If |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VLOOKUP
Rob,
SheetN.Range("A6").Formula = "=VLOOKUP(RIGHT(A4,2), Values!$A1:$B104,2,FALSE)", where SheetN identifies the target worksheet like Sheet1 or Worksheets("SheetName"), Worksheets(1), etc. Bob "Rob H" wrote in message ... Hi I am using the following code If Len(Trim(.GetText(mainloop, 57, 10))) 0 Then Range("a4").Offset(CrashLoopTest + reccounter, 0).Value = Trim(.GetText(mainloop, 57, 10)) CrashLoopTest = CrashLoopTest + 1 End If to Check if the length of a string (with its trailing and leading spaces removed) is larger than 0, get the string if it is and write it to cell a4 incrementing the value of recounter (which is a cell) by the value of 1. This is part of the Crashloop process. I have created another field on the sheet and require the following code to be added to the above but arent sure where to put it or if it will need changing to allow it to work. =VLOOKUP(RIGHT(A4,2), Values!$A1:$B104,2,FALSE) This is what i am manually having to add to each cell when the MainLoopTest process has finished for each row. I realise I need to interupt the mainlooptest process and take out the = from the VLOOKUP statement. Any Help much appreciated. btw... I had thought of putting it in as you see below but it just spits out erorrs saying invalid characters ($) and then requests a list seperator. Is this because I would use the VLOOKUP function in a different way in the script rather than on the sheet? If Len(Trim(.GetText(mainloop, 57, 10))) 0 Then Range("a4").Offset(CrashLoopTest + reccounter, 0).Value = Trim(.GetText(mainloop, 57, 10)) VLOOKUP(RIGHT(A4,2), Values!$A1:$B104,2,FALSE) CrashLoopTest = CrashLoopTest + 1 End If |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
VLOOKUP
Thanks Guys I have got it to work. Good Work.
"Rob H" wrote in message ... Hi I am using the following code If Len(Trim(.GetText(mainloop, 57, 10))) 0 Then Range("a4").Offset(CrashLoopTest + reccounter, 0).Value = Trim(.GetText(mainloop, 57, 10)) CrashLoopTest = CrashLoopTest + 1 End If to Check if the length of a string (with its trailing and leading spaces removed) is larger than 0, get the string if it is and write it to cell a4 incrementing the value of recounter (which is a cell) by the value of 1. This is part of the Crashloop process. I have created another field on the sheet and require the following code to be added to the above but arent sure where to put it or if it will need changing to allow it to work. =VLOOKUP(RIGHT(A4,2), Values!$A1:$B104,2,FALSE) This is what i am manually having to add to each cell when the MainLoopTest process has finished for each row. I realise I need to interupt the mainlooptest process and take out the = from the VLOOKUP statement. Any Help much appreciated. btw... I had thought of putting it in as you see below but it just spits out erorrs saying invalid characters ($) and then requests a list seperator. Is this because I would use the VLOOKUP function in a different way in the script rather than on the sheet? If Len(Trim(.GetText(mainloop, 57, 10))) 0 Then Range("a4").Offset(CrashLoopTest + reccounter, 0).Value = Trim(.GetText(mainloop, 57, 10)) VLOOKUP(RIGHT(A4,2), Values!$A1:$B104,2,FALSE) CrashLoopTest = CrashLoopTest + 1 End If |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
VLOOKUP
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
If (Vlookup 0) working, but what if Vlookup cell does not exist | Excel Worksheet Functions | |||
VLookUp - Does the VLookUp return the exact information? | Excel Worksheet Functions | |||
Vlookup in vlookup - taking the result as array name | Excel Worksheet Functions | |||
Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP | Excel Discussion (Misc queries) | |||
Vlookup -=VLOOKUP(F9,LookUp1!$A$2:$B$1504,2,FALSE) | New Users to Excel |