#1   Report Post  
randy_tn
 
Posts: n/a
Default If Statement


I am needing to have a macro look at a Cell and (B8) and determine if it
has a value greater than 0. IF it does I need it to copy the contents
to another cell (M8) then move down 4 cells. IF the value is "======"
then I am done.

Can somone PLEASE help me with this?


--
randy_tn
------------------------------------------------------------------------
randy_tn's Profile: http://www.excelforum.com/member.php...o&userid=16001
View this thread: http://www.excelforum.com/showthread...hreadid=274679

  #2   Report Post  
merlin
 
Posts: n/a
Default


"randy_tn" schreef in bericht
...

I am needing to have a macro look at a Cell and (B8) and determine if it
has a value greater than 0. IF it does I need it to copy the contents
to another cell (M8) then move down 4 cells. IF the value is "======"
then I am done.

Can somone PLEASE help me with this?


--
randy_tn
------------------------------------------------------------------------
randy_tn's Profile:

http://www.excelforum.com/member.php...o&userid=16001
View this thread: http://www.excelforum.com/showthread...hreadid=274679


Public Sub Test()
Dim wb As Workbook, ws As Worksheet
Set wb = ThisWorkbook
Set ws = wb.ActiveSheet
ws.Cells(8, 2).Select
If Val(Selection) 0 Then
ws.Cells(8, 13).Value = Selection
End If
ws.Cells(12, 2).Select
If Selection = "======" Then
'You're done
Exit Sub
Else
'Code here
End If
End Sub


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
Excel Report Using IF Statement? Marc Excel Discussion (Misc queries) 3 January 11th 05 07:38 AM
IF Statement with Average Function results in #Value! Paul Excel Discussion (Misc queries) 5 December 28th 04 08:11 AM
VBA Command to Look at cell in an If statement Wolf New Users to Excel 3 December 27th 04 11:27 PM
=IF statement Dick Excel Discussion (Misc queries) 10 November 27th 04 02:47 PM
IF Statement difficulty susan hayes Excel Worksheet Functions 3 November 2nd 04 09:46 PM


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