Forum Discussion
Conditionally Add Value to Column Based on Separate Column
Hello,
I am trying to format a spreadsheet with a large list of addresses. In one column, there is a complete list of addresses. In another, I am trying to list days in which each address should be grouped. Ex. If 100 Apple St., 101 Apple St., 102... etc. are all found in Column A, I want its corresponding cell in column B to hold the value "Monday". If 100 Orange St., 101..., 102..., etc. are found in column A, I want their corresponding cells in column B to hold the value "Tuesday".
I have tried the following formula in column B:
=IF(COUNTIF(*CELL-IN-COLUMN-A*,"ADDRESS")," DAY", "")
Obviously this didn't work. When applying the formula to column B, the conditional value is false, thus setting the value blank when changing the address.
I need formatting that will update blank cells whenever the address is changes, but keep existing values. I haven't found anything detailing a way to altogether ignore cells in the column if there is already data in it and the conditional is false. Thanks in advance.
EDIT: I have now tried the formula
=IF(ISNUMBER(SEARCH("value in column A", A1)), "value to be added to column B", B1)
This almost works, but whenever I populate the rest of the rows using this formula, it fills every row with "value to be added to column B".
1 Reply
- NikolinoDEPlatinum ContributorAs far as I could gather from the problem, here is a formula you might use in column B:
=IF(A1<>"", VLOOKUP(A1, $D$1:$E$5, 2, FALSE), "")