Results 1 to 10 of 10

If a condition is met convert range to value from formula

Threaded View

  1. #1
    Registered User
    Join Date
    08-08-2012
    Location
    Winter Park, Florida
    MS-Off Ver
    Excel2010
    Posts
    12

    If a condition is met convert range to value from formula

    Good Afternoon All

    First I just want to thank everyone on here regardless of solution. I have been following this board for a while and this site has always helped me expand my knowledge of VBA. I am no expert by any means but i now enough to get myself into trouble.

    Image if you will of a spreadsheet where in column A you have a drop down with two options to pick from open and close.

    Columns B - E have formulas in them that pull from another sheet (specifically vlookup formulas)

    What i am trying to accomplish is this. If a person selects close from the drop down in column A, columns (B-E), on that row, gets converted from the vlookup formula to its value.

    I have tried writing this a number of way but either excel says that there is a problem with the code or i get the wrong result. I just can't seem to get it to specify to the specific rows that meet the condition. This is the closest working code that i have so far:

    Sub Celladjust()
    
     Dim rng As Range
        
       Set rng = Range("A:A")
       For Each Cell In rng
           If Cell.Value = "close" Then
        Columns("B:E").Select
        Selection.Copy
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
        End If
        Next
    End Sub
    I have tried specifying range for rows but I am doing something wrong.

    If someone can help point me in the right direction with this that would be amazing.
    Thank you all.
    MG
    Last edited by Mothergreen; 01-10-2016 at 08:19 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA-Excel to convert Tax Formula with condition
    By Parth007 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 03-12-2015, 04:54 PM
  2. Replies: 2
    Last Post: 09-01-2014, 07:59 AM
  3. Need formula using 'If' condition & inserting a specific range.
    By andyzz in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-26-2014, 02:58 AM
  4. [SOLVED] Looping through a range and inserting a formula where condition met
    By strud in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-06-2014, 06:24 AM
  5. Formatting a range and Adding a formula to convert the range.
    By Technodruid in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-28-2010, 02:22 PM
  6. How to you convert condition to formula?
    By stormracela in forum Excel General
    Replies: 1
    Last Post: 05-27-2010, 05:18 AM
  7. Index Formula - adding a range condition
    By Henry c in forum Excel General
    Replies: 2
    Last Post: 04-29-2010, 10:19 AM

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