Home

Need to combine two if statements

%3CLINGO-SUB%20id%3D%22lingo-sub-774308%22%20slang%3D%22en-US%22%3ENeed%20to%20combine%20two%20if%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-774308%22%20slang%3D%22en-US%22%3E%3CP%3ELol%20I%20have%20tried%20for%20hours%20to%20figure%20this%20out%2C%20I%20need%20to%20combine%20this%20two%20if%20statements%26nbsp%3B%3CBR%20%2F%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3Eif%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3E(%3C%2FSPAN%3E%3CSPAN%3EE3%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20%20default-formula-text-color%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20string%20%22%3E%22n%22%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3E%2C%3C%2FSPAN%3E%3CSPAN%3EB3%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3E)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3Eif%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3E(%3C%2FSPAN%3E%3CSPAN%3EE3%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20%20default-formula-text-color%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20string%20%22%3E%22y%22%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3E%2C%3C%2FSPAN%3E%3CSPAN%3EF3%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3E)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3EI%20am%20sure%20this%20is%20completely%20simple%20and%20will%20kick%20myself%20when%20someone%20gives%20me%20the%20answer%2C%20thank%20you!%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-774308%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-774310%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20to%20combine%20two%20if%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-774310%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F382377%22%20target%3D%22_blank%22%3E%40tinksmama%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Elike%3C%2FP%3E%0A%3CPRE%3E%3DIF(E3%3D%22n%22%2C%20B3%2C%20IF(E3%3D%22y%22%2C%20F3%2C%20%22%22))%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-774343%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20to%20combine%20two%20if%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-774343%22%20slang%3D%22en-US%22%3EYES!!!!!%3CBR%20%2F%3Ethank%20you!%3CBR%20%2F%3E%3CBR%20%2F%3EOne%20more%3F%20I%20have%20a%20cell%20that%20calculates%20how%20many%20days%20from%20when%20an%20invoice%20was%20sent%20to%20today%2C%20but%20since%20this%20cell%20is%20in%20regards%20to%20a%20secondary%20invoice%20there%20isn't%20always%20a%20secondary%20invoice%2C%20so%20no%20date%2C%20when%20there's%20no%20date%20is%20populates%20with%2043671%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E
Highlighted
tinksmama
New Contributor

Lol I have tried for hours to figure this out, I need to combine this two if statements 
=if(E3="n",B3)

=if(E3="y",F3)

 

I am sure this is completely simple and will kick myself when someone gives me the answer, thank you!

3 Replies

@tinksmama 

like

=IF(E3="n", B3, IF(E3="y", F3, ""))
YES!!!!!
thank you!

One more? I have a cell that calculates how many days from when an invoice was sent to today, but since this cell is in regards to a secondary invoice there isn't always a secondary invoice, so no date, when there's no date is populates with 43671

@tinksmama , you are welcome.

 

Dates in Excel are actually sequential integer numbers starting from 1 which is equivalent of 01 Jan 1900 (for Windows).  Thus 43671 that's the sequential number of the date starting from above date. If you apply Date format to that cell it will show 25 July 2019.

You may check if there is no date entered then return invoice age as zero, e.g.

=IF( LEN(A1)=0, 0, TODAY()-A1)

or return empty string "" instead of zero.

Related Conversations
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
14 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
23 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies