Forum Discussion
Excel formula
- Jul 05, 2023
Hi LauraJackson This formula should works=IF(A2<>"";"";B2).
Regards
https://www.upwork.com/freelancers/~01cf0fc8446b00f44c
Hi LauraJackson
Let me clarify something if you need to take actian based on data in colunm A or B you need a new colunm to do it, let's suppose C. If you do it in this way, yo can inlcude following formula en column C.
IF (A2<>"", "", B2).
If you like to keep just columns A and B you can "hide" values in column B with conditional formatting settting font color like a backgroud color. You can use following condition in conditional formatting =$A4<>""
I'm not sure if I got your point. If not please share an example.
Regards
https://www.upwork.com/freelancers/~01cf0fc8446b00f44c
Hi Leo,
Thank you for your help. For our purposes let's pretend B2's value is currently "purple".
If A2 is not blank, then populate B2 from A2.
If A2 is blank, then keep "purple".
- leoperdiaJul 01, 2023Brass Contributor
Hi LauraJackson, what you want is impossible using just formulas, if you need to keep just two columns. This is Because you can not have a previous value and a formula in the same cell. At least to my best knowledge, you have these options:
1-Add a column C which has logic and expected results
A B C Yellow Purple Yellow White Green White Purple Purple 2- Make it through VBA code, it is possible using the event change of the worksheet. But I'm not sure if you like to use code.
Let me know if the second option works for you and I'll tell you the code.
Regards
https://www.upwork.com/freelancers/~01cf0fc8446b00f44c
- LauraJacksonJul 05, 2023Copper Contributor
Hi Leo,
Option 1 is perfect! I had not thought about it that way. Any thoughts on how I could create this formula in a column C?- if column A has a value, then column C should be empty.
- if column A does NOT have a value, then column C should populate from column B.
- leoperdiaJul 05, 2023Brass Contributor
Hi LauraJackson This formula should works=IF(A2<>"";"";B2).
Regards
https://www.upwork.com/freelancers/~01cf0fc8446b00f44c
- peiyezhuJun 30, 2023Bronze Contributorcolumn A does NOT have a value, then column B should keep the value it currently has.
Could you please share a file with somedata and show your expected result?
I am confused about the meaning about the above words.