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

listi.net

 


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
blog comments powered by Disqus