Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default IF statement help needed

I am using excel 2007. I have a spreadsheet that contains data:

Acct no Date PPT Paid Sales Tax Amount

1000 4/30/10 60.46 4.54 65.00
1000 4/30/10 32.55 2.45 35.00
1000 4/30/10 65.00 0 65.00
1000 4/30/10 35.00 0 35.00

(PPT Paid + Sales Tax = Amount). I want to exclude the last 2 records. I
can't use sales tax 0 because I have other records that may have no sales
tax but are still valid. I have tried the delete duplicates on the menu bar
and it helps for some records but not all cases. Eventually I want to add a
subtotal to the account number once the dupes are gone. The dates will vary
for when each account was paid. Any ideas??

Thanks everyone!!
Bruce
  #2   Report Post  
Posted to microsoft.public.excel.misc
dlw dlw is offline
external usenet poster
 
Posts: 510
Default IF statement help needed

you need to come up with more conditions so Excel knows when a 0 tax is valid
and when a 0 tax is invalid

"Bruce D." wrote:

I am using excel 2007. I have a spreadsheet that contains data:

Acct no Date PPT Paid Sales Tax Amount

1000 4/30/10 60.46 4.54 65.00
1000 4/30/10 32.55 2.45 35.00
1000 4/30/10 65.00 0 65.00
1000 4/30/10 35.00 0 35.00

(PPT Paid + Sales Tax = Amount). I want to exclude the last 2 records. I
can't use sales tax 0 because I have other records that may have no sales
tax but are still valid. I have tried the delete duplicates on the menu bar
and it helps for some records but not all cases. Eventually I want to add a
subtotal to the account number once the dupes are gone. The dates will vary
for when each account was paid. Any ideas??

Thanks everyone!!
Bruce

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default IF statement help needed

I am new to excel. How would I go about doing that?
--
Bruce


"dlw" wrote:

you need to come up with more conditions so Excel knows when a 0 tax is valid
and when a 0 tax is invalid

"Bruce D." wrote:

I am using excel 2007. I have a spreadsheet that contains data:

Acct no Date PPT Paid Sales Tax Amount

1000 4/30/10 60.46 4.54 65.00
1000 4/30/10 32.55 2.45 35.00
1000 4/30/10 65.00 0 65.00
1000 4/30/10 35.00 0 35.00

(PPT Paid + Sales Tax = Amount). I want to exclude the last 2 records. I
can't use sales tax 0 because I have other records that may have no sales
tax but are still valid. I have tried the delete duplicates on the menu bar
and it helps for some records but not all cases. Eventually I want to add a
subtotal to the account number once the dupes are gone. The dates will vary
for when each account was paid. Any ideas??

Thanks everyone!!
Bruce

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 89
Default IF statement help needed

Bruce, some thoughts he

Surely each row has an invoice number? Are you looking for instances where
the same invoice might have been posted twice in error, or where two invoices
(with different numbers) may have been erroneously raised for the same
transaction?

I can't help with VB to automatically find and delete duplicates, but
assuming either will not be too numerous an occurrence, will
semi-automatically highlighting duplicates for manual deletion be sufficient?
It may even be the safest way, enabling you to visually check before deleting.

If so, let's look at invoices duplicated (with same number) in error: I
would record a macro that sorted by the invoice number column in ascending
order, then duplicates can easily be detected by a very simple formula.

Let's say for example, your invoice number is in column B beteen your
Account number and Date. Now out in, say, column G you can put in a formula
to test for duplicate invoice numbers as follows (assuming you are on row 3):
=IF(B3=B2,1,0) (but see "Note" below re deleting rows)

Now if you sum column G, you will have a total of the number of duplicates
to be deleted. The formula Sum(G:G) will sum the whole column for you, and
you can have that total reflected in a fixed, easy-to-see place. At (say)
the top of your worksheet you can reserve an area for warning messages, which
might be row 1. In (say) A1 enter the formula
=IF(SUM(G:G)0,CONCATENATE("Warning: Duplicates = ",SUM(G:G)),"No
Duplicates"). That looks complicated but its not. The "Concatenate" function
merely joins the contents of two cells together, in this case your chosen
text plus the numerical value from G1000.

Given this information you can work down the sheet deleting duplicates until
the message "No Duplicates" appears at A1. Easier if in your macro you freeze
the windows to keep row A (warning row) visible.

Of course, you can record a second macro to re-sort into you regular order
and reverse any other actions performed by the first macro (such as
unprotecting the worksheet, and you may want to hide column G and row A,
because "No Duplicates" could be misleading at other times when not sorted
into invoice order :-)).

Note: If you use this formula in column G that compares the current cell to
the one above, deleting a row will corrupt the formula below as it will refer
to a non-existent cell. Thats a weakness of this method. Instead of deleting
a row, for ease, record a macro that deletes the contents of all non-formula
holding cells in the row, and when re-sorted it will just become a blank row
ready to be re-used. (Remember tho, that if you add columns later the macro
won't know about it and will delete the wrong cells, so to be smart you can
add hidden columns now, before recording the macro, for expanding the
spreadsheet later. Gosh...I wish I'd have done that! LOL)

If you want to use conditional formatting, you can make a cell background
turn red for example, if its contents (or the contents of another cell) are
1. Makes it even easier to find those duplicates!


Thats enough to think on for one post. If the problem wasn't duplicate
invoices (2 of the same number) but transactions raised twice on 2 different
invoices, we can talk about it again if you'd like.

Here's a final tip I learned (the hard, embarrassing way!) when I was a
beginner: If you sum columns or name ranges, always include a shaded row or
column at top and bottom of the range, so that if you add a row or column it
won't inadvertently get added outside a named range of summed column or row!
That can cost dearly in both dollars and embarrassement!

Cheers,
Kevryl


"Bruce D." wrote:

I am using excel 2007. I have a spreadsheet that contains data:

Acct no Date PPT Paid Sales Tax Amount

1000 4/30/10 60.46 4.54 65.00
1000 4/30/10 32.55 2.45 35.00
1000 4/30/10 65.00 0 65.00
1000 4/30/10 35.00 0 35.00

(PPT Paid + Sales Tax = Amount). I want to exclude the last 2 records. I
can't use sales tax 0 because I have other records that may have no sales
tax but are still valid. I have tried the delete duplicates on the menu bar
and it helps for some records but not all cases. Eventually I want to add a
subtotal to the account number once the dupes are gone. The dates will vary
for when each account was paid. Any ideas??

Thanks everyone!!
Bruce

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
=IF(AND(OR statement needed? bracket89 Excel Worksheet Functions 2 March 16th 07 02:13 AM
Another IF statement needed Connie Martin Excel Worksheet Functions 4 November 16th 06 08:56 PM
IF STATEMENT HELP NEEDED!!! Excel Dummy Excel Discussion (Misc queries) 2 December 30th 05 07:02 PM
much needed If/or statement help Yupkwondo Excel Discussion (Misc queries) 4 August 18th 05 02:45 AM
If statement help needed please Ian Harris Excel Discussion (Misc queries) 3 December 3rd 04 11:37 AM


All times are GMT +1. The time now is 05:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"