Excel IF and OR Formula Help

%3CLINGO-SUB%20id%3D%22lingo-sub-2704242%22%20slang%3D%22en-US%22%3EExcel%20IF%20and%20OR%20Formula%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2704242%22%20slang%3D%22en-US%22%3E%3CP%3EI%20tried%20on%20my%20own%20but%20I%20have%20confused%20myself.%26nbsp%3B%20Trying%20to%20write%20excel%20formulas%20for%20all%20same%20spreadsheet%20parameters%3A%3C%2FP%3E%3CP%3E1.%20%22if%22%20column%20H%20is%20blank%20then%20pull%20data%20from%20column%20G%20or%20column%20I%20(which%20ever%20one%20contains%20a%20valid%20mailing%20address).%3C%2FP%3E%3CP%3E2.%20%22if%22%20column%20N%20is%20blank%20but%20column%20P%20has%20data%2C%20copy%20data%20to%20column%20N%3C%2FP%3E%3CP%3E3.%20%22if%22%20column%20P%20is%20blank%20but%20column%20N%20has%20data%2C%20copy%20it%20to%20column%20P%3C%2FP%3E%3CP%3EAny%20help%20is%20much%20appreciated%20as%20I%20made%20my%20own%20head%20spin%20trying%20to%20figure%20this%20out%20how%20to%20combine%20if%20and%20or%20formulas.%26nbsp%3B%20I%20am%20not%20sure%20that's%20even%20what's%20needed.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2704242%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2704296%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20IF%20and%20OR%20Formula%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2704296%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1142722%22%20target%3D%22_blank%22%3E%40Misshexadecimal23%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20would%20require%20VBA.%20Do%20you%20want%20it%20to%20run%20automatically%20when%20the%20user%20enters%20data%20in%20columns%20G%2C%20I%2C%20P%20or%20N%3F%20Or%20would%20it%20be%20OK%20to%20run%20the%20code%20on%20demand%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2704452%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20IF%20and%20OR%20Formula%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2704452%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F425987%22%20target%3D%22_blank%22%3E%40mathetes%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CTABLE%20width%3D%221104%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20width%3D%22123%22%3ECust%20No%3C%2FTD%3E%3CTD%20width%3D%2264%22%3EDivision%3C%2FTD%3E%3CTD%20width%3D%22133%22%3ECust%20Name%3C%2FTD%3E%3CTD%20width%3D%22227%22%3EJob%20Description%3C%2FTD%3E%3CTD%20width%3D%22162%22%3EInfluencer%20Name%3C%2FTD%3E%3CTD%20width%3D%2264%22%3ETitle%3C%2FTD%3E%3CTD%20width%3D%22125%22%3EAddress%201%3C%2FTD%3E%3CTD%20width%3D%22142%22%3EAddress%202%3C%2FTD%3E%3CTD%20width%3D%2264%22%3EAddress%203%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E43%3C%2FTD%3E%3CTD%3EG%3C%2FTD%3E%3CTD%3Eexample%201%3C%2FTD%3E%3CTD%3Esales%3C%2FTD%3E%3CTD%3Ejohn%20doe%3C%2FTD%3E%3CTD%3EOWNER%3C%2FTD%3E%3CTD%3Eexample%201%3C%2FTD%3E%3CTD%3EPO%20BOX%20159%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3C%2FLINGO-BODY%3E
New 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.