Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Given the following equation: 2^X - 2 = N

I'd like to solve for X. N is known.

What function could I use in Excel to do this?

Thanks in advance.

share|improve this question

closed as too localized by Mike Fitzpatrick, Indrek, Canadian Luke, Diogo, Synetech Oct 12 '12 at 1:32

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Is that supposed to be 2^(X-2)= N or (2^X) - 2 = N? – tarheel Oct 11 '12 at 16:37
up vote 3 down vote accepted

=(log(A1+2)/log(2)) where A1 is the source cell.

share|improve this answer

X = log(N+2)/log(2)

log is an excel function, the rest is more about solving an equation.

share|improve this answer
That makes sense. Thank you. – mheathershaw Oct 11 '12 at 16:39

Put X in a cell and use the goal seek function, e.g.:

  • in A1, enter a value of X, e.g. 1
  • in A2, enter the formula =2^A1-2
  • Data Menu \ What If analysis \ Goal Seek
  • Set cell A2 to value N by changing cell A1
share|improve this answer

Not the answer you're looking for? Browse other questions tagged .