Results 1 to 4 of 4

How to make macro to return a value?

Threaded View

  1. #1
    Registered User
    Join Date
    02-22-2013
    Location
    Troy, US
    MS-Off Ver
    Excel 2010
    Posts
    2

    How to make macro to return a value?

    Hi guys, I am new in Excel VBA and for the experiment data, I want to find the first number that is bigger than the next one, and i want it to show on a blank cell. How can I achieve this?
    The following is the code I wrote

    Sub find_yeild_stress()
    For i = 19 To 83
    If Cells(i, F).Value > Cells(i + 1, F).Value Then
    Cells(3, f).Copy.Cells(i, F).Value
    End If
    Next i
    End Sub
    Thank you for help!!
    Last edited by jeffreybrown; 02-22-2013 at 10:02 PM. Reason: Please use code tags...Thanks.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1