Excel IF and OR Formula Help

Copper Contributor

I tried on my own but I have confused myself.  Trying to write excel formulas for all same spreadsheet parameters:

1. "if" column H is blank then pull data from column G or column I (which ever one contains a valid mailing address).

2. "if" column N is blank but column P has data, copy data to column N

3. "if" column P is blank but column N has data, copy it to column P

Any help is much appreciated as I made my own head spin trying to figure this out how to combine if and or formulas.  I am not sure that's even what's needed.

 

5 Replies

@Misshexadecimal23 

This would require VBA. Do you want it to run automatically when the user enters data in columns G, I, P or N? Or would it be OK to run the code on demand?

@Misshexadecimal23 

 

Do you have an actual spreadsheet in which you want to accomplish this? Can you post a copy? [If the actual contains real names of real people, then make a mock-up of at least a few of the rows that illustrate the problems you're trying to solve.]

 

That said, some questions that need to be asked or points that need to be made with regard to your questions.

1. "if" column H is blank then pull data from column G or column I (which ever one contains a valid mailing address).

Pull data to which column? It can't be column H that contains the formula because then it's not blank to begin with. What do you want done if both G and I have valid addresses? [By the way, it's a mistake to include an entire address in a single cell.] So you would need to be doing this IF....THEN in some other column altogether, perhaps column  J.

 

2. "if" column N is blank but column P has data, copy data to column N

3. "if" column P is blank but column N has data, copy it to column P

Similar to what I said above, these IF...THEN formulas would need to be in a cell in a column other than N or P, because a formula in one of those columns means it's not blank.

 

Any help is much appreciated as I made my own head spin trying to figure this out how to combine if and or formulas. I am not sure that's even what's needed.

It could be that you're trying to do what I just pointed out won't work, making a cell not be blank by entering a formula in it that checks whether or not it's blank.

 

In any event, if you could post a copy (or a mock-up) of what you're working with, then we can offer some specific help.

 

@mathetes 

Cust NoDivisionCust NameJob DescriptionInfluencer NameTitleAddress 1Address 2Address 3
43Gexample 1salesjohn doeOWNERexample 1PO BOX 159 
sorry that didn't copy columns over:
Cust No. is Column A and then consecutive letters from left to right thereafter.

@Misshexadecimal23 

sorry that didn't copy columns over:
Cust No. is Column A and then consecutive letters from left to right thereafter.

It's also not an Excel spreadsheet, and, to the extent that it did contain information, it didn't contain any that illustrated what you're trying to resolve. I have no problem visualizing what columns and names and addresses look like. What I'd like to see is what you're actually working with.

 

As @Hans Vogelaar has already said, if you really want to do exactly what you said in your first post, it's not a formula you need, but a VBA (Visual Basic) routine (or macro). I'm wanting to see what you're actually working with, the actual spreadsheet (or a mock-up, still in Excel but without the confidential info), WITH problem columns that need to be fixed, so as to determine whether a formula or two can do it.

 

Your choice.