Nov 28 2023 03:14 AM
Nov 29 2023 01:47 AM
Thank you for informing me that double quots are necessary.
I have other problems as well. Can you see what is wrong with the following?
=IF(b9=blank;blank;IF(b9=''B3'';''B2''))
Regards Jan Erik
Nov 29 2023 02:26 AM
You have to use the double quote character " (Shift+' on my keyboard), not two single quote characters ' next to each other.
And blank is not a valid keyword in Excel. Use the empty string "" (two double quote characters) instead:
=IF(B9="";"";IF(B9="B3";"B2"))
What do you want to return if B9 is not empty and not equal to "B3"? In that case, the formula will currently return FALSE because you don't specify the return value.
Nov 29 2023 10:23 AM
Nov 29 2023 11:29 AM
This time. you're using "curly quotes" ”” instead of straight quotes "".
And you definitely shouldn't use »» in Excel.
Also, you forgot the parentheses and a semicolon.
=IF(B9="";"";IF(B9="B3";"B2";""))
Alternatively, slightly shorter:
=IF(B9="B3";"B2";"")
Nov 30 2023 12:48 AM
Nov 30 2023 01:30 AM
Nov 30 2023 02:59 AM
Could you attach a small sample workbook demonstrating the problem (without sensitive data), or if that is not possible, make it available through OneDrive, Google Drive, Dropbox or similar?
Nov 30 2023 04:03 AM
Hans, the easiest for me would be to attach an excerpt to an email.
I don't know how to make it available to you via Drop Box or similar. I suppose this is not according to rules to use email
Nov 30 2023 08:54 AM
You can attach a file to a private message. Click on my user picture.
Dec 01 2023 02:27 AM
Thanks, I have received the workbook. I don't see any formulas. In which cell(s) do you want a formula?
Dec 01 2023 02:49 AM
Dec 01 2023 02:51 AM
A formula in B9 cannot refer to B9. That would cause a circular reference.
Can you explain what you want to accomplish?
Dec 01 2023 03:20 AM
Dec 01 2023 04:12 AM
You could use the Replace dialog (Ctrl+H).
Select the range.
First, enter B3 in the 'Find what' box and B2 in the 'Replace with' box, then click 'Replace All'.
Next, enter B4 in the 'Find what' box and B3 in the 'Replace with' box, then click 'Replace All'.
Done!
If you prefer formulas, you could return the desired values in another range, not in the same range.
See the attached version.
It would also be possible to run a macro to replace the values, but that might be overkill.
Dec 01 2023 07:14 AM