I have part of a formula already written..need to add another part..

Marq

Well-known Member
Joined
Dec 13, 2004
Messages
914
Office Version
  1. 365
  2. 2007
Platform
  1. Windows
How would I complete this formula...I had help from the baord with the part I have alreay but I want to add another equation into it:

I would like to put in cell M39 to say the following:

If the value in M38 is greater than ZERO then leave M39 blank....BUT if the value of cell M38 has no value then COUNTIF($Z$1:$AC$6,M38-1)+COUNTIF($Z$1:$AC$6,M38+1),0)
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Here is another shot after seeing that cell M15 is also in use here.

<TABLE style="WIDTH: 549pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=732><COLGROUP><COL style="WIDTH: 549pt; mso-width-source: userset; mso-width-alt: 13385" width=732><TBODY><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6 1pt solid; BACKGROUND-COLOR: #eaf1dd; WIDTH: 549pt; HEIGHT: 30.75pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl63 height=41 rowSpan=2 width=732>=IF(ISNUMBER(M38),"",COUNTIF($Z$1:$AC$6,M15-1)+COUNTIF($Z$1:$AC$6,M15+1))


</TD></TR><!-- / message --><!-- sig --><TR style="HEIGHT: 15.75pt" height=21></TR></TBODY></TABLE>
 
Upvote 0
Here is another shot after seeing that cell M15 is also in use here.

<TABLE style="WIDTH: 549pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=732><COLGROUP><COL style="WIDTH: 549pt; mso-width-source: userset; mso-width-alt: 13385" width=732><TBODY><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: #3867a6 1pt solid; BORDER-LEFT: #3867a6 1pt solid; BACKGROUND-COLOR: #eaf1dd; WIDTH: 549pt; HEIGHT: 30.75pt; BORDER-TOP: #3867a6 1pt solid; BORDER-RIGHT: #3867a6 1pt solid" class=xl63 height=41 rowSpan=2 width=732>=IF(ISNUMBER(M38),"",COUNTIF($Z$1:$AC$6,M15-1)+COUNTIF($Z$1:$AC$6,M15+1))


</TD></TR><!-- / message --><!-- sig --><TR style="HEIGHT: 15.75pt" height=21></TR></TBODY></TABLE>

still no luck....its ok gang....im beginning to feel awkward now coming back saying it's not working...i'll try to figured out another way to get the results...Thanks again for the all the help.
 
Upvote 0
#NAME?,

This is nice!

=SUM(COUNTIF($Z$1:$AC$6,M15+{1,-1}))
(y)


Marq,

I understand what you are saying,

....im beginning to feel awkward

don't think about it. Instead, think how cool it will be when this works as you would like. :)
I would like to help. Let me know if you still need to sort this out.

Here is my examples:

Excel Workbook
MZAAABAC
127252830
228272528
329282425
430292324
528302926
627312721
1527
38
396
Sheet1

Excel 2007
Cell Formulas
RangeFormula
M39=IF(ISNUMBER(M38),"",COUNTIF($Z$1:$AC$6,M15-1)+COUNTIF($Z$1:$AC$6,M15+1))


You can see in the above that while M38 is blank, the formula in M39 evaluates the COUNTIF part (FALSE condition of IF. The COUNTIF part uses cell M15 and in the above, is 27. The COUNTIF is looking for the numbers 28 and 26. There are 6 in the table that are found resulting in 6.


And here is with a 1 in cell M38:

Excel Workbook
M
381
39
Sheet1
Excel 2007
Cell Formulas
RangeFormula
M39=IF(ISNUMBER(M38),"",COUNTIF($Z$1:$AC$6,M15-1)+COUNTIF($Z$1:$AC$6,M15+1))



Basically, when M38 is blank, the TRUE result of IF is displayed or "".
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,928
Members
449,094
Latest member
teemeren

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