Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
IF Statement question | Excel Discussion (Misc queries) | |||
IF statement question | Excel Worksheet Functions | |||
IF then statement question | Excel Discussion (Misc queries) | |||
Question about dim statement | Excel Programming | |||
If Statement Question | Excel Worksheet Functions |