text: Q:
  
  If we know the units of a quantity is it valid to write a formula just so that the units are dimensionally correct?
  
  Here is a very simple example:
  The definition of an electric field is 
  $$\vec E = \frac{\text{Force}}{\text{Charge}}=\frac{\vec F}{Q}$$ and it's dimensions are N$\mathrm{C}^{-1}$ (Newtons per Coulomb). 
  But newtons per coulomb has the same dimensionality as V$\mathrm{m}^{-1}$ (Volts per Metre).
  If we are just considering the magnitude of the quantity $\vec E$;
  Is it valid to write 
  $$\fbox{$|\vec E| = \frac{\text{Voltage}}{\text{Length of conductor}}=\frac{V}{\ell}$}\tag{1}$$ since the dimensions are the same?
  
  EDIT:
  I have now had a chance to read all of your answers and comments and acknowledge that the general answer to this question (in the title) is no. 
  Thank you to all that responded; I really appreciate your time! The answers are wonderful! 
  However, many of you have said that it is also invalid to write equation $(1)$ as I did at the start. 
  In one of the answers @user121330 mentioned that "You should provide the actual example if you want more clarity". I also mentioned in a comment below this question that I would "upload the example I spoke of"; so here it is:
  
  This is page 107 from "Physics 2 for OCR" by authors David Sang and Gurinder Chadha first published in 2009 by Cambridge University Press and has ISBN: 978-0-521-73830-9. 
  More information about the book can be found on their website www.cambridge.org/9780521738309
  
  More importantly is that equation $(1)$ is also being used to derive Ohm's Law:
  
  This was a small extract taken from my lecturer's notes.
  
  So does it seem that electric field cannot be written as $$E=-\frac{V}{\ell}$$ or in magnitude as $$E=\frac{V}{\ell}$$ and both the book and my lecturer are wrong?   
  
  A:
  
  Is it valid to write 
    $$|\vec E| = \frac{\text{Voltage}}{\text{Length of conductor}}=\frac{V}{\ell}$$ since the dimensions are the same?
  
  No, because instead of $E=V/\ell$, the answer could just as easily be $E=V/2\ell$ or $E=\pi V/\ell$. That is, such an approach can at best give an answer that is ambiguous up to a universal unitless factor.
  That doesn't mean the technique is useless. If you're already convinced for physical or mathematical reasons that there should be an equation of the form $E=f(V,\ell)$ for some function $f$, then this technique greatly narrows down the possibilities, which provides a check on your result when you actually solve the problem. In some cases, the unitless constant of proportionality may not even be needed, e.g., if you're only going to use your result to form a ratio like $E_1/E_2$ that compares two different cases.
  
  A:
  
  Is it valid to write 
    $$|\vec E| = \frac{\text{Voltage}}{\text{Length of conductor}}=\frac{V}{\ell}$$ since the dimensions are the same?
  
  No.  In part, $\vert \vec E\vert \ne \frac{V}{\ell}$ in general but rather
  $\vec E=-\vec\nabla V$, which has the same units as $V/\ell$ since
  $\vec\nabla=\hat x\frac{\partial }{\partial x}+\hat y\frac{\partial }{\partial y}+\hat z\frac{\partial }{\partial z}$.  Another example would be 
  $$
  v=\frac{dx}{dt}\ne \frac{x}{t}
  $$
  in general.
  In addition, dimensional analysis does not provide you with correct dimensionless proportionality factors.  Thus, the volume of a sphere
  $v=\frac{4}{3}\pi r^3$ not just $r^3$, which has units of volume.
  In general, dimensional analysis can help you conclude that
  $v\propto r^3$ or that $V$ is proportional to $\vec E\vert$ multiplied by a distance (in general $V\sim \int \vec E\cdot d \vec\ell$) but dimensional analysis does not capture spatial changes such as
  $E_x=-\frac{dV}{dx}$ or rates of change so as $a=\frac{dv}{dt}$.
  (see also here)
  
  A:
  
  The current answers touch on some important points, but remain far from the worst case scenario.
  To see this, consider the possibility of some units cancelling out completely. A common example of this is the resistance $R$ (units of Ohms) of a wire as a function of its resistivity $\rho$ (units of Ohms per meter). Based on the units of these quantities, you might expect the resistance of some wire of length $\ell$ to be given by $R = \rho / \ell$, but this is wildly wrong. In fact, the resistance is given by $R = \rho \ell / A$, where $A$ is the wire's cross-sectional area.
  Dimensional analysis can often give good intuition to what some possible solutions to a problem might be, but it should never be the sole tool used to reach a conclusion.
  
  