What am I Doing Wrong??

CVBASIMON

New Member
Joined
May 30, 2012
Messages
30
So I am trying to find the end of a column and input an if statment withing those 70 something cells. Below is my script any ideas??

FinalRow = Cells(Rows.Count, 2).End(xlUp).Row
Range("A2" & FinalRow).Formula = "=if(F2="","", Today())"
Range("A2").Copy Destination:=Range("A2" & FinalRow)

o_Oo_Oo_O
 
minor rewrite of your code, several modifications made

should answer both of your questions
Code:
FinalRow = Cells(Rows.Count, "c").End(xlUp).Row
Range("A2:A" & FinalRow).Formula = "=if(C2="""", """", today())"
Range("A2").Copy Destination:=Range("A2:A" & FinalRow)


Awesome! Thank you everyone for your help on this! The modification I had been missing was the "C" in count. Thank you for all the help.
 
Upvote 0

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Forum statistics

Threads
1,215,826
Messages
6,127,116
Members
449,359
Latest member
michael2

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