Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Combine Two vba Lines(If Condition + Vlookup)


Hi there

Code:
--------------------

'IF isempty(cells(r,14)) then leave Cells(r, 15) empty.
Cells(r, 15) = Application.VLookup(Cells(r, 4), AccChart2, 2, False)

--------------------


how to combine these tow line to be written in one VBA line?


--
helmekki


------------------------------------------------------------------------
helmekki's Profile: http://www.excelforum.com/member.php...fo&userid=6939
View this thread: http://www.excelforum.com/showthread...hreadid=392467

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Combine Two vba Lines(If Condition + Vlookup)

This seems too simplistic, but do you mean

IF Not isempty(cells(r,14))
Cells(r, 15) = Application.VLookup(Cells(r, 4), AccChart2, 2, False)
End If


--
HTH

Bob Phillips

"helmekki" wrote in
message ...

Hi there

Code:
--------------------

'IF isempty(cells(r,14)) then leave Cells(r, 15) empty.
Cells(r, 15) = Application.VLookup(Cells(r, 4), AccChart2, 2, False)

--------------------


how to combine these tow line to be written in one VBA line?


--
helmekki


------------------------------------------------------------------------
helmekki's Profile:

http://www.excelforum.com/member.php...fo&userid=6939
View this thread: http://www.excelforum.com/showthread...hreadid=392467



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Combine Two vba Lines(If Condition + Vlookup)


Thank u very muc

--
helmekk

-----------------------------------------------------------------------
helmekki's Profile: http://www.excelforum.com/member.php...nfo&userid=693
View this thread: http://www.excelforum.com/showthread.php?threadid=39246

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Combine Two vba Lines(If Condition + Vlookup)


If IsEmpty(Cells(r, 14)) Then
Cells(r, 15) = Null
Else
Cells(r, 15) = Application.VLookup(Cells(r, 4), AccChart2, 2,
False)
End If


I think this is what you are trying to do


--
tony h
------------------------------------------------------------------------
tony h's Profile: http://www.excelforum.com/member.php...o&userid=21074
View this thread: http://www.excelforum.com/showthread...hreadid=392467

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
How to combine more than one condition for CONDITIONAL FORMATTING Asoka Walpitagama - Brandix College IT Excel Discussion (Misc queries) 1 November 11th 09 04:10 PM
Combine an OR condition with an AND condition Will Excel Discussion (Misc queries) 1 April 6th 07 03:52 PM
How to delete lines programmatically if a condition is met? nt_artagnian[_2_] Excel Discussion (Misc queries) 1 March 7th 07 05:39 PM
"how to combine multiple lines into a pull down option?" eric_mc2 Excel Worksheet Functions 1 July 4th 05 03:06 AM
How to combine lines of code? Papa Jonah Excel Programming 2 February 17th 05 08:23 AM


All times are GMT +1. The time now is 11:34 PM.

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

About Us

"It's about Microsoft Excel"