index.js
function cellref (ref) {
  if (R1C1.test(ref)) {
    return convertR1C1toA1(ref)
  }

  if (A1.test(ref)) {
    return convertA1toR1C1(ref)
  }

  throw new Error(`could not detect cell reference notation for ${ref}`)
}
function cellref (ref) {
  if (R1C1.test(ref)) {
    return convertR1C1toA1(ref)
  }

  if (A1.test(ref)) {
    return convertA1toR1C1(ref)
  }

  throw new Error(`could not detect cell reference notation for ${ref}`)
}
function cellref ( ref ) { if ( R1C1 . test ( ref ) ) { return convertR1C1toA1 ( ref ) } if ( A1 . test ( ref ) ) { return convertA1toR1C1 ( ref ) } throw new Error ( ` ${ ref } ` ) }
Auto detect notation used and convert to the opposite notation

@param   {String} ref
@returns {String}
@throws  {Error}
Auto detect notation used and convert to the opposite notation