Find value and then reference cell 2 above

Nerdalert314

New Member
Joined
Mar 28, 2018
Messages
23
Good afternoon,

Sorry if this is repeated by I'm not even sure how to work this.

I have a call that has the value "Total Cash". I am using this to find the cell. I can also use find and replace.

HTML:
    Cells.Find(What:="TOTAL CASH", After:=ActiveCell, LookIn:=xlFormulas, _
        LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
        MatchCase:=False, SearchFormat:=False).Activate

I then want to remove "TOTAL CASH" and put it in the cell 2 above it. My attempt at this did not work.

HTML:
ActiveCell.Offset(-2, 0).Range("A1").ActiveCell.FormulaR1C1 = "TOTAL CASH"

Any suggestions?
 

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.
Code:
Sub TotalCash()
Dim Found As Range
Set Found = Cells.Find(What:="TOTAL CASH", After:=ActiveCell, LookIn:=xlFormulas, _
        LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
        MatchCase:=False, SearchFormat:=False)
    If Not Found Is Nothing Then Found.Offset(-2, 0).Value = "TOTAL CASH"
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,692
Members
448,979
Latest member
DET4492

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