Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
LOOKUP VALUE
Hi, I need your expert advise on my question below.
I need to lookup column say 'H' that has a wording "CASCAUT" and if true retun result in column 'S' 'Please don't pay'. I know I can use if & vlookup formula to return the result but column 'S' has information which I do not want to erase. Would appreciate your advise. Many thanks in advance! LC ANG |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
LOOKUP VALUE
Try this:
Sub Test() Dim sHlookup As String Dim sSRturn As String Dim iLastRow As Integer iLastRow = Range("H65536").End(xlUp).Row Set rng = Range("H1:H" & iLastRow) For Each rng In rng If rng.Value = "CASCAUT" Then rng.Offset(0, 11).Value = rng.Offset(0, 11).Value & " Do not Pay" End If Next rng End Sub -- If this posting was helpful, please click on the Yes button. Regards, Michael Arch. "LC ANG" wrote: Hi, I need your expert advise on my question below. I need to lookup column say 'H' that has a wording "CASCAUT" and if true retun result in column 'S' 'Please don't pay'. I know I can use if & vlookup formula to return the result but column 'S' has information which I do not want to erase. Would appreciate your advise. Many thanks in advance! LC ANG |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
lookup help. lookup result based on data in 2 columns | Excel Worksheet Functions | |||
LOOKUP FUNCTION? (LOOKUP VALUE BEING A TIME RENERATED FROM A FORMU | Excel Discussion (Misc queries) | |||
Lookup looks to the prior column if zero appears in the lookup col | Excel Discussion (Misc queries) | |||
Matrix lookup/mulitple criteria lookup | Excel Discussion (Misc queries) | |||
Join 2 Lists - Lookup value in 1 list & use result in 2nd lookup | Excel Worksheet Functions |