# IF - AND not working properly?

1. ## IF - AND not working properly?

Hello all, I am new to the forums. I feel like I know a bit about Excel, but certainly not *that* intelligent.

I'm attempting to create a spreadsheet that will compile cash register data for me automatically from data that I export from a different program. The exporting issue isn't my problem; I just can't seem to get my "IF AND" formula to work the way I want.

What I have are two worksheets within a single book. The first sheet is called "December Totals" - this is the data that is exported from an external program. I have the numerical data all formatted to the correct category (date, number, etc.).

DecTotals.JPG

The second sheet is called "December Final" - this is the workbook I will print out from the compiled data.

DecFinal.JPG

As you can see, on the "Totals" sheet, there are numerous dates showing cash taken in on certain registers; not all registers have cash transactions each day, so there is no data to export. I'd like to get the "Total Discrepancy" column data to be input into the correct cell, depending on the date and register that had the discrepancy. However, my current formula is not working:

=IF(AND('December Final'!B3='December Totals'!B:B, 'December Final'!C2='December Totals'!A:A), 'December Totals'!H:H, "")

I've tried selecting the entire column (B:B) and individual cells excluding the headers (B2:B17) to no avail.

Hopefully I've explained my issue well enough. I'm turning to the geniuses on this forum to slap me across the face with my error and hopefully get me pointed in the right direction!

2. ## Re: IF - AND not working properly?

Hello and Welcome to the Forum,

Give this a try...

C3 copied across and down >> =SUMIFS('December Totals'!\$H:\$H,'December Totals'!\$A:\$A,C\$2,'December Totals'!\$B:\$B,\$B3)

If this does not do it, how about attaching a sample workbook. Without a sample workbook we have to redo your work. (See the "Yellow" banner about)

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1