Results 1 to 4 of 4

Thread: Insert Value When A Conditin is Met

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Administrator Admin's Avatar
    Join Date
    Mar 2011
    Posts
    1,123
    Rep Power
    10
    Hi Ajit,

    Welcome to ExcelFox !!

    You can accomplish by inserting the formula in F4 and copied down,

    =IFERROR(IF(D4="C","Same Day Cancel",""),"")
    Cheers !

    Excel Range to BBCode Table
    Use Social Networking Tools If You Like the Answers !

    Message to Cross Posters

    @ Home - Office 2010/2013/2016 on Win 10 (64 bit); @ Work - Office 2016 on Win 10 (64 bit)

  2. #2
    Junior Member
    Join Date
    Sep 2013
    Posts
    2
    Rep Power
    0
    Hi Admin!

    Thanks very much for your reply. However, I'm looking for a VB code to do the same in an excel sheet. For eg., I want a loop to be written in VB code such that the loop looks at the whole of a range...say Cell C3 to C5000 and gives the output as "Same Day Cancel" in Col E for any of the cells found in Col C. I've managed to put the below loop in but doesn't work for a given range:


    Code:
     Sub test()
    
    If Range("C3:C5000").Value = "C" Then Range("E3:E5000").Value = "Same Day Cancel"
    
    End Sub
    It only works for a given Cell i.e C3 but not C3:C5000.

    Thanks much for your help. Would you be able to help me put in a loop pls?

    -Ajit

Similar Threads

  1. Replies: 2
    Last Post: 07-02-2013, 06:52 PM
  2. Macro To Insert Columns In Excel
    By jac3130 in forum Excel Help
    Replies: 2
    Last Post: 05-17-2013, 07:49 AM
  3. Automatically Insert Row
    By marreco in forum Excel Help
    Replies: 7
    Last Post: 12-21-2012, 06:43 PM
  4. Insert Picture in a Cell UDF
    By Admin in forum Download Center
    Replies: 10
    Last Post: 12-07-2012, 04:49 PM
  5. help with after insert event in Access 10
    By richlyn in forum Access Help
    Replies: 9
    Last Post: 03-03-2012, 10:49 PM

Posting Permissions

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