Excel - Copy down formula if cells non-blank

Issue

I need code to copy down a formula from R2 to R3, R4, R5 etc only if H3, H4, H5 etc is non-blank.

  • I also need to copy formulae from U2:CY2 to U3:CY3, U4:CY4 etc only if S3, S4 =1

Solution

You can use if statement as a wrapper for you function

=IF(ISBLANK(H2), ""

, put your formula here)

Note that

Thanks to rizvisa1 for this tip on the forum.

Ask a question
CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jean-François Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.
This document, titled « Excel - Copy down formula if cells non-blank », is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).