Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

128
Views
Excel Custom Function #VALUE error when returning a salt hash

I have a custom excel function that calculates a salt hash and attempts to return the hash and the salt as an array. When I run the function, the values appear to be generated correctly but I get a #VALUE error when trying to display them and I'm not sure why. It appears that the issue is coming from the salt portion of the hash. Excel doesn't seem to like a value starting with "$" so if I add a space before the salt value then it works correctly. Why am I receiving a #VALUE error and how can I resolve it?

Excel AddIn Code

/**
 * Returns hash for input text.
 * @customfunction SALT_HASH
 * @param {string} text
 * @param {string} [salt]
 * @returns string[][]
 */
export async function saltHash(text: string, salt?: string): Promise<string[][]> {
  try {
    const saltHash = await api.saltHash(text, salt);
    const response = [[saltHash.hash, saltHash.salt]];
    Logger.info(response);
    return response;
  } catch (error) {
    Logger.error(new SaltHashErrorLog("Salt hash function call failed", text, salt, error).log());
    return [[`Salt hash function call failed: ${buildErrorMessage(error)}`]];
  }
}

Example API Response

{
    "hash": "1IDvJZuvNSLS3EQl7kD9jLm2qN7Sp5K",
    "salt": "$2b$10$BAsip4RJH8MMz0G7Dw5EvO"
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!