Home > Excel Tutorial > Insert Formula Into Cell With Macro Code

Insert Formula Into Cell With Macro Code

Insert Formula Into Cell With VBA Macro  Code

Especially this method is quick solution in multiple cell .

For example :

“Sheets(“DATA”).Range(“I2”).AutoFill Destination:=Range(“I2:I4000″ ), Type:=xlFillDefault”

Issues to be considered :

– The extra quotes  must be used . Example : “= IF(D12<=0,”valid”,F5*H5)”

– The comma must be used instead of semicolon. Example : “= IF(F5<=0, H5,F5*H5)”   ,when used into page : “= IF(F5<=0; H5;F5*H5)”   

Download Working Example

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: