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

Mldeuser

Well-known Member
Joined
Dec 27, 2008
Messages
574
Office Version
  1. 365
Platform
  1. Windows
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
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
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
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top