Results 1 to 11 of 11

Paste when criteria is met?

Threaded View

  1. #1
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Paste when criteria is met?

    Ok. This is an exercise for my understanding of VBA. I am a little iffy on the syntax to paste a value in the next cell when a criteria is met?
    BTW, I know I could do this via a VLOOOKUP in VBA, but in this instance I don't want to, this purely to learn the syntax for a situation like this

    I am using Find in my code to get the value BTW.
    Code:
    Dim FVal As Variant 'this is the criteria
    
    If FVal Is Nothing Then
                GoTo nxt
               Else
                Worksheets("Sheet1").Cells(     ?    ).Offset(0, 1).Value = Worksheets("Sheet1").Cells(2, 1).Value  'where the ? is , that will be the cell with the same value as FVal
                  
    End If
    Attached Files Attached Files
    Last edited by JapanDave; 12-09-2011 at 07:05 PM.
    Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
    I am the real 'Napster'
    The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...

    If you receive help please give thanks. Click the * in the bottom left hand corner.

    snb's VBA Help Files

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