Creating IF/AND formula

jtmbell

New Member
Joined
Nov 12, 2014
Messages
16
I'm working with a large excel doc that has several tabs. Trying to create a formula to tell me if there's an account number listed in column A AND if it has an X in column DJ for that specific account. If both the account number and the X in DJ are there I need an X in the new cell.


I am trying the following but it keeps coming up saying we found a problem and I have been unable to resolve using the Insert Formula tab.
=IF(countif('3.6'!A:A,A39),(AND('3.6'!DJ:DJ,DJ39),"blank","X","")


This formula below says there are too many arguments: =IF(countif('3.6'!A:A,A39),AND('3.6'!DJ:DJ,DJ39),"blank","X","")

All help is greatly appreciated!
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Is this formula taking up only one cell telling you the answer for multiple cells at once or is it populating a column, telling u the answer for each row?
 
Upvote 0
The formula will be for each row. So the answer will go in column DJ on my new tab. I'm basically trying to be able to carry forward that information with each new tab from the previous tab but the account numbers in each row could be in a different order with each new tab.
 
Upvote 0
You have WAY too many arguments in your IF statement. An IF statement only has 3 arguments (condition, true clause, false clause). You have 5! I have color coded them below.
=IF(countif('3.6'!A:A,A39),(AND('3.6'!DJ:DJ,DJ39),"blank","X","")

I think you want something like this:
=IF(COUNTIFS(
'3.6'!A:A,A39,'3.6'!DJ:DJ,"X"),"X","")
 
Last edited:
Upvote 0
The formula will be for each row. So the answer will go in column DJ on my new tab. I'm basically trying to be able to carry forward that information with each new tab from the previous tab but the account numbers in each row could be in a different order with each new tab.

For each row u want something like:
For Row 1: =if(and(A1<>"",DJ1="X"),"BLANK","X")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,246
Members
452,623
Latest member
cliftonhandyman

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top