Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 791
Default 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
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
lookup help. lookup result based on data in 2 columns lcc Excel Worksheet Functions 3 April 6th 10 01:20 PM
LOOKUP FUNCTION? (LOOKUP VALUE BEING A TIME RENERATED FROM A FORMU JCC Excel Discussion (Misc queries) 5 June 26th 09 09:15 PM
Lookup looks to the prior column if zero appears in the lookup col kenbquik Excel Discussion (Misc queries) 2 March 12th 09 03:41 AM
Matrix lookup/mulitple criteria lookup MarkFranklin Excel Discussion (Misc queries) 3 March 31st 08 10:15 AM
Join 2 Lists - Lookup value in 1 list & use result in 2nd lookup JBush Excel Worksheet Functions 3 January 3rd 07 11:14 PM


All times are GMT +1. The time now is 05:42 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"