Two questions, same answer?

bpflyr

Board Regular
Joined
Nov 7, 2005
Messages
116
Here's what I am trying to do. I think these have similar solutions, I just think I am missing the obvious answer.

1. (This needs to go in cell L22). If C22="C560", then copy J22. If J22 has no data, then be blank.

2. (This needs to go in cell M22). If C22="C560" AND K22>0, then copy K22. If K22 has no data, then be blank.

Thank you in advance!!
 

Some videos you may like

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,457
Office Version
  1. 365
Platform
  1. Windows
1. (This needs to go in cell L22). If C22="C560", then copy J22. If J22 has no data, then be blank.
=IF(AND(C22="C560",LEN(J22)>0),J22,"")

Note: Are you comparing to cell C560? If so, remove the quotes around it.

2. (This needs to go in cell M22). If C22="C560" AND K22>0, then copy K22. If K22 has no data, then be blank.
=IF(AND(C22="C560",LEN(K22)>0,K22>0),K22,"")
 

bpflyr

Board Regular
Joined
Nov 7, 2005
Messages
116
Thanks! That got it. By the way, I'm a little new to Excel, what does LEN stand for?
 

tusharm

MrExcel MVP
Joined
May 28, 2002
Messages
11,028
Searched XL Help for 'LEN' (w/o the quotes)?
bpflyr said:
Thanks! That got it. By the way, I'm a little new to Excel, what does LEN stand for?
 

Watch MrExcel Video

Forum statistics

Threads
1,118,760
Messages
5,574,083
Members
412,566
Latest member
TexasTony
Top