ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   I need a formula for a Golf Scorecard (https://www.excelbanter.com/excel-discussion-misc-queries/35643-i-need-formula-golf-scorecard.html)

Timmy

I need a formula for a Golf Scorecard
 
If the value of column B is greater by 2 than the value of column A, Record
as 1 in column C.

Bill Kuunders

enter in C2
=IF(B2-A22,1,"")
and copy down

--
Greetings from New Zealand
Bill K
"Timmy" wrote in message
...
If the value of column B is greater by 2 than the value of column A,
Record
as 1 in column C.




Timmy

Thanks for your help Bill, Im in NZ too!!!
Unfortunatly your formula did not work. It doesnt show up as invalid but
just turns up a blank(not a zero even) in the C column.....Help!!!

"Bill Kuunders" wrote:

enter in C2
=IF(B2-A22,1,"")
and copy down

--
Greetings from New Zealand
Bill K
"Timmy" wrote in message
...
If the value of column B is greater by 2 than the value of column A,
Record
as 1 in column C.





Roger Govier

Try
=IF(B2-A2=2,1,"")

to pick up when the difference is actually 2

--
Regards
Roger Govier
"Timmy" wrote in message
...
Thanks for your help Bill, Im in NZ too!!!
Unfortunatly your formula did not work. It doesnt show up as invalid but
just turns up a blank(not a zero even) in the C column.....Help!!!

"Bill Kuunders" wrote:

enter in C2
=IF(B2-A22,1,"")
and copy down

--
Greetings from New Zealand
Bill K
"Timmy" wrote in message
...
If the value of column B is greater by 2 than the value of column A,
Record
as 1 in column C.







Timmy

Great!!!!thats it!! Now Can I enter more than one function like this in the
same formula to keep building my total ....something like:

=IF(B2-A2=2,1,"") + (B3-A3=2,1,"") + ........and so on, so my result of 1
would keep tallying 1+1+1+1 = 4

"Roger Govier" wrote:

Try
=IF(B2-A2=2,1,"")

to pick up when the difference is actually 2

--
Regards
Roger Govier
"Timmy" wrote in message
...
Thanks for your help Bill, Im in NZ too!!!
Unfortunatly your formula did not work. It doesnt show up as invalid but
just turns up a blank(not a zero even) in the C column.....Help!!!

"Bill Kuunders" wrote:

enter in C2
=IF(B2-A22,1,"")
and copy down

--
Greetings from New Zealand
Bill K
"Timmy" wrote in message
...
If the value of column B is greater by 2 than the value of column A,
Record
as 1 in column C.







Bill Kuunders

Timmy

From your first reply
it looked like you want a 0 result if not =2.
This can be done with =IF(B2-A2=2,1,0)
With copy down I indicated that you can extend the formula down the column.
Use the right hand bottom corner of C2 cell
The mouse pointer changes to a black "+" sign
hold and drag down
You can then add the results in that column.

Regards
Bill K

"Timmy" wrote in message
...
Great!!!!thats it!! Now Can I enter more than one function like this in
the
same formula to keep building my total ....something like:

=IF(B2-A2=2,1,"") + (B3-A3=2,1,"") + ........and so on, so my result of
1
would keep tallying 1+1+1+1 = 4

"Roger Govier" wrote:

Try
=IF(B2-A2=2,1,"")

to pick up when the difference is actually 2

--
Regards
Roger Govier
"Timmy" wrote in message
...
Thanks for your help Bill, Im in NZ too!!!
Unfortunatly your formula did not work. It doesnt show up as invalid
but
just turns up a blank(not a zero even) in the C column.....Help!!!

"Bill Kuunders" wrote:

enter in C2
=IF(B2-A22,1,"")
and copy down

--
Greetings from New Zealand
Bill K
"Timmy" wrote in message
...
If the value of column B is greater by 2 than the value of column A,
Record
as 1 in column C.









Max

If I've read you correctly, this might work (in a single cell):

Put in say, C1: =SUMPRODUCT(--(B2:B100-A2:A100=2))

Adapt the range to suit ..

And for a cleaner look when cols A and B are cleared, you could switch off
extraneous zeros display in the sheet via:
Click Tools Options View tab Uncheck "Zero values" ok
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Timmy" wrote in message
...
Great!!!!thats it!! Now Can I enter more than one function like this in

the
same formula to keep building my total ....something like:

=IF(B2-A2=2,1,"") + (B3-A3=2,1,"") + ........and so on, so my result of

1
would keep tallying 1+1+1+1 = 4




Bill Kuunders

Of course!!!

Thanks Max
Bill K

"Max" wrote in message
...
If I've read you correctly, this might work (in a single cell):

Put in say, C1: =SUMPRODUCT(--(B2:B100-A2:A100=2))

Adapt the range to suit ..

And for a cleaner look when cols A and B are cleared, you could switch off
extraneous zeros display in the sheet via:
Click Tools Options View tab Uncheck "Zero values" ok
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Timmy" wrote in message
...
Great!!!!thats it!! Now Can I enter more than one function like this in

the
same formula to keep building my total ....something like:

=IF(B2-A2=2,1,"") + (B3-A3=2,1,"") + ........and so on, so my result of

1
would keep tallying 1+1+1+1 = 4






Max

You're welcome, Bill !
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Bill Kuunders" wrote in message
...
Of course!!!

Thanks Max
Bill K




Timmy

Sorry for the slow response guys....Thanks alot for you help!!! That was it
(Max's formula).Now all I got to do is win!!!

"Max" wrote:

You're welcome, Bill !
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Bill Kuunders" wrote in message
...
Of course!!!

Thanks Max
Bill K





Max

You're welcome, Timmy !
Thanks for posting back ..
Good luck with your winnings <g !
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Timmy" wrote in message
...
Sorry for the slow response guys....Thanks alot for you help!!!
That was it (Max's formula).Now all I got to do is win!!!





All times are GMT +1. The time now is 07:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com