Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default Countif and sumif combination problem

Hi,
I have two sheets in same workbook and they appear as follows:

Sheet1 Sheet2
Column A Column B Column A Column B Column C
(PO#) ($) (Invoice#) (PO#)

111 $15,000 222223 114
112 $20,000 222223 150
Blank cell $10,000 222240 Blank cell
Blank cell $90,000 150001 113
113 $23,560 450000 113
114 $14,890 222224 113
185 $56,870 222225 Blank cell
150 $1,560 222227 185
Blank cell $97,000 150000 112

Im using following formula in cell C2 sheet2 Column C:
=IF(COUNTIF($B$2:B2,B2)1,"Already
Recognised",SUMIF(Sheet1!A:A,Sheet2!B2,Sheet1!B:B) )

Its basically matching PO# from sheet2 Column B and looking it in sheet1
column A and then picking up the relevant amount from sheet1 Column B and
populating it in sheet2 Column C (where formula is being used).

My problem is that once I come across a blank cell in sheet2 Column B it
adds all the blank cells from sheet1 Column A and populates in the relevant
cell under Column C sheet2. I want to populate the blank cell with a text €˜PO
Missing where there is a blank cell in sheet2 Column B.

Thanks in advance for your help.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 793
Default Countif and sumif combination problem

Try
=IF(B2="", "PO Missing",IF(COUNTIF($B$2:B2,B2)1,"Already
Recognised",SUMIF(Sheet1!A:A,Sheet2!B2,Sheet1!B:B) ))

"tipoo" wrote:

Hi,
I have two sheets in same workbook and they appear as follows:

Sheet1 Sheet2
Column A Column B Column A Column B Column C
(PO#) ($) (Invoice#) (PO#)

111 $15,000 222223 114
112 $20,000 222223 150
Blank cell $10,000 222240 Blank cell
Blank cell $90,000 150001 113
113 $23,560 450000 113
114 $14,890 222224 113
185 $56,870 222225 Blank cell
150 $1,560 222227 185
Blank cell $97,000 150000 112

Im using following formula in cell C2 sheet2 Column C:
=IF(COUNTIF($B$2:B2,B2)1,"Already
Recognised",SUMIF(Sheet1!A:A,Sheet2!B2,Sheet1!B:B) )

Its basically matching PO# from sheet2 Column B and looking it in sheet1
column A and then picking up the relevant amount from sheet1 Column B and
populating it in sheet2 Column C (where formula is being used).

My problem is that once I come across a blank cell in sheet2 Column B it
adds all the blank cells from sheet1 Column A and populates in the relevant
cell under Column C sheet2. I want to populate the blank cell with a text €˜PO
Missing where there is a blank cell in sheet2 Column B.

Thanks in advance for your help.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default Countif and sumif combination problem

Great...Thanks Champ it worked.

"Sheeloo" wrote:

Try
=IF(B2="", "PO Missing",IF(COUNTIF($B$2:B2,B2)1,"Already
Recognised",SUMIF(Sheet1!A:A,Sheet2!B2,Sheet1!B:B) ))

"tipoo" wrote:

Hi,
I have two sheets in same workbook and they appear as follows:

Sheet1 Sheet2
Column A Column B Column A Column B Column C
(PO#) ($) (Invoice#) (PO#)

111 $15,000 222223 114
112 $20,000 222223 150
Blank cell $10,000 222240 Blank cell
Blank cell $90,000 150001 113
113 $23,560 450000 113
114 $14,890 222224 113
185 $56,870 222225 Blank cell
150 $1,560 222227 185
Blank cell $97,000 150000 112

Im using following formula in cell C2 sheet2 Column C:
=IF(COUNTIF($B$2:B2,B2)1,"Already
Recognised",SUMIF(Sheet1!A:A,Sheet2!B2,Sheet1!B:B) )

Its basically matching PO# from sheet2 Column B and looking it in sheet1
column A and then picking up the relevant amount from sheet1 Column B and
populating it in sheet2 Column C (where formula is being used).

My problem is that once I come across a blank cell in sheet2 Column B it
adds all the blank cells from sheet1 Column A and populates in the relevant
cell under Column C sheet2. I want to populate the blank cell with a text €˜PO
Missing where there is a blank cell in sheet2 Column B.

Thanks in advance for your help.

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
SUBTOTAL and COUNTIF (or SUMIF) combination DKS Excel Worksheet Functions 3 August 15th 15 07:14 AM
Sumif / countif Problem Martin Excel Discussion (Misc queries) 5 April 4th 08 05:04 AM
SUMIF / COUNTIF Problem Rif Excel Worksheet Functions 7 July 24th 06 09:23 AM
COUNTIF COMBINATION?? Heather Excel Worksheet Functions 1 April 26th 05 02:44 AM
COUNTIF or SUMIF Problem s boak Excel Discussion (Misc queries) 4 March 24th 05 02:45 PM


All times are GMT +1. The time now is 05:46 AM.

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

About Us

"It's about Microsoft Excel"