By using kp4s.com you agree to our cookie policy, We and our partners operate globally and use cookies, for multiple purposes

115 Key Principles for Success



Principle 115 - Don't Hardcode cell references


In Excel be careful when hard codiing cell references as it makes it hard to modify code.

Example, cell R2 was used to get the date but I had to insert a column before column R.  I broke the code and had to waste time fixing these issues.


use the following:

c = finddatacol("date field")

if c = 0 then stop

date = cells(2, c)

'the date is in row 2

   ←10-20-30 Rule of PowerPoint | →Summary | Table of Contents | Send us your feedback | Random | © 2025 All Rights Reserved | Edit