Copy Paste Formula Issue Help!

mikeeee

New Member
Joined
Sep 23, 2010
Messages
9
I have a Formula =IF(H1803="YES","REPLY RECEIVED","") which puts Reply Received in a cell when YES is entered into another cell. The formula works great. It's just that I am applying it to a large file that already has YES in some of the cells and the corresponding cell already has a comment but not necessarily Reply Received. I am copying and pasting the formula down a column but I am having to skip all the cells that have a comment other than Reply Received. Is there a way to change the formula to make it disregard the cells that have a comment already or even better would be to just add Reply Received to the existing comment in the cell if one is present? Any ideas? Otherwise I am having to paste the formula into each empty cell and skip the prepopulated ones which is going to take a long time.

Thanks in advance!
 

Some videos you may like

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type

WarPigl3t

Well-known Member
Joined
May 25, 2014
Messages
1,609
There is no formula option because as you already stated, you'll have to manually skip cells that have other stuff in them.
Code:
a = "C"  'change C to the column that contains the formula.  You didn't specify the column in your message
lastRow = Range(a & Rows.Count).End(xlup).Row
i = 2  'if you do not have headers, i = 1
Do Until i > lastRow
     If Range(a & i).value = "" And Range("H" & i).value = "YES" Then
          Range(a & i).value = "REPLY RECIEVED"
     End If
     i = i + 1
Loop
 

Watch MrExcel Video

Forum statistics

Threads
1,127,359
Messages
5,624,234
Members
416,017
Latest member
moritz210

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
Top