#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default 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







  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default VLOOKUP

Using the function in vba requires modification
Sub lookupsheet()
'=VLOOKUP(A3,Sheet3!A2:I4,9,FALSE)
MsgBox Application.VLookup([A3], [Sheet3!A2:I4], 9, False)
End Sub

try

If Len(Trim(.GetText(mainloop, 57, 10))) 0 Then
Range("a4").Offset(CrashLoopTest + reccounter, 0).Value =
Trim(.GetText(mainloop, 57, 10))
application.VLOOKUP(RIGHT([A4],2), [Values!$A1:$B104],2,FALSE)
CrashLoopTest = CrashLoopTest + 1
End If


--
Don Guillett
SalesAid Software

"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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default VLOOKUP

glad to help

--
Don Guillett
SalesAid Software

"Rob H" wrote in message
...
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









Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
If (Vlookup 0) working, but what if Vlookup cell does not exist Steve Excel Worksheet Functions 18 November 18th 09 07:33 PM
VLookUp - Does the VLookUp return the exact information? Cpviv Excel Worksheet Functions 2 October 28th 08 09:57 AM
Vlookup in vlookup - taking the result as array name SupperDuck Excel Worksheet Functions 2 June 2nd 07 11:05 AM
Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP buffgirl71 Excel Discussion (Misc queries) 12 November 14th 06 11:36 PM
Vlookup -=VLOOKUP(F9,LookUp1!$A$2:$B$1504,2,FALSE) MikeR-Oz New Users to Excel 1 March 22nd 06 09:01 AM


All times are GMT +1. The time now is 10:02 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"