Excel - Copy Formula Down Column

Hi,

I have the fillowing formula in M2:
=IF(D2<>"",D2,"")

I would like to copy this formulla to an unspecified (ie varied) number down column M. I use the method of going to the location area in the top left of the screen, and type in M2:M30000 - for example.

I then hit Ctrl D and Enter - and the formula copies down. However, D2, changes to D3, D4, etc.

Please offer how I can maintain D2 all the way down the column.

Thank you
tahirihAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Dave BrettConnect With a Mentor Vice President - Business EvaluationCommented:
use absolute references, ie
=IF($D$2<>"",$D$2,"")

hth
0
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Connect With a Mentor Microsoft MVP ExcelCommented:
Hello,

use an absolute reference for the cell you want to stay the same

=IF($D$2<>"",$D$2,"")

cheers, teylyn
0
 
tahirihAuthor Commented:
Thank you both - yes, I recalled this soon after posting.
0
All Courses

From novice to tech pro — start learning today.