Formula based on condition otherwise enter manually

Copper Contributor

Hi Everyone, 

 

I am trying to solve a problem

 

Lets say that cells in Column A contain either "loss" "single target" or "double target"

 

In column B I want to enter data manually if the corresponding cell in column A is either "single target" or "double target". However if the cell in Column A is "Loss", I want to use a formula.

 

How enter this in excel?

4 Replies

Hello,

 

well, you could use a formula and overwrite it manually, something like

 

=if(A1="loss",YourFormula,"")

 

Copy down. Now only the cells where column A has "loss" will show the result of your formula, and you can manually type over the formula in other cells.

 

Does that work for you?

Thank you for your response.

Yes this would however it leads me to another problem.
I have entered the formula into the column B.
How would I paste my values for single and double targets in this column so that it fills the blank cells?

"" is technically not not blank.
When I past my single and double target figures in the column, it overwrites the Loss formula.

I hope that this is clear

Michael,

 

either you use VBA - which I can't help you with - or you use two helper columns: one with the formula and the second for the manual input. In the final column you put them together:

=IF(Column_with_Input)<>"",Column_with_Input,Column_with_formula)

@Michael Kwakye I agree with @Detlef Lewin. Some things will not be possible in one go. 

 

If you had mentioned in your question that you want to paste values into the column, then my reply would have been different. It is always good to explain the whole picture.

 

I suggest you paste the values into a helper column, then use a formula to pull the helper column value if it is not blank, else do the calculation.