Results 1 to 2 of 2

Thread: Move value found in one column to another column based on criteria in another column
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular
    Join Date
    Dec 2008
    Location
    Minneapolis, Minnesota
    Posts
    514
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Move value found in one column to another column based on criteria in another column

    I have a large spread sheet where some values down load to the wrong column. To fix this I am looking for a macro that can look in Column H and where it finds Balance Forward look in the same row at column J and if there is a value move that to column K.

    Columns L and M will have values in them that need to stay.

    Example: H15 = Balance Forward, J15 = 214,111.63, K15 blank cell, L15 2,300.70 (needs to stay), M15 = 2,389,858.62 (needs to stay).

    Thank you
    Mark

  2. #2
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    29,120
    Post Thanks / Like
    Mentioned
    483 Post(s)
    Tagged
    49 Thread(s)

    Default Re: Move value found in one column to another column based on criteria in another column

    How about
    Code:
    Sub Mldeuser()
       Dim Rng As Range
       With Range("H2", Range("H" & Rows.Count))
          .Replace "Balance Forward", True, xlWhole, , False, , False, False
          For Each Rng In .SpecialCells(xlConstants, xlLogical).Areas
             Rng.Offset(, 3).Value = Rng.Offset(, 2).Value
             Rng.Offset(, 2).ClearContents
             Rng.Value = "Balance Forward"
          Next Rng
       End With
    End Sub
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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