LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default If statement question


I am making a macro to copy data from a cell in one workbook and pastin
it into another workbook. Unfortunatly I don't know VB too well, I'
more use to writing formulas in excel cells.

I'm trying to write an IF, THEN, ELSE statement in which the progra
will not display a cells contents if there is nothing to display (blan
cell). I do most of my programs in excel rather than VB. This is wha
I would put in excel to do what im looking to do: If(A1="","",A1).
How do I go about doing that in VB? Here is what I have so far, I'
just working around it by telling the program to display the results i
a different cell, but its not working as planned, and I need the progra
to just not display the info anywhere.

Dim NTHNG As String
Dim TFR1 As String

NTHNG = Range("GL19").Value
TFL1 = Range("BK12").Value

If TFL1 = "" Then .Cells(3, 115).Value = NTHNG Else .Cells(12
63).Value = TFL1

Any help would be appreciated

Da

--
dl
-----------------------------------------------------------------------
dlb's Profile: http://www.excelforum.com/member.php...fo&userid=1648
View this thread: http://www.excelforum.com/showthread.php?threadid=51243

 
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 Statement question peg84 Excel Discussion (Misc queries) 3 February 4th 08 10:19 PM
IF statement question [email protected] Excel Worksheet Functions 2 July 24th 06 04:20 PM
IF then statement question ChuckW Excel Discussion (Misc queries) 2 February 24th 06 04:30 PM
Question about dim statement Gregg[_4_] Excel Programming 4 July 19th 05 03:07 PM
If Statement Question carl Excel Worksheet Functions 1 March 11th 05 04:55 AM


All times are GMT +1. The time now is 05:23 AM.

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"