Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 42
Default How do I make a checked check box = 1 instead of True?

I hope that this is the correct group in which to post this question.

I've written a 6,000-line macro and I've used lots of formulas but I've
never worked with check boxes (until now).

I don't want the Check Box's "cell link" to return True or False, I want it
to return a value ... "1" if True and a "0" if False because I need to add it
to another value. In other words, if the box is checked, add 1. If it's not
checked, add 0 as in:

=IF(H6="USD",80,5)+if(CheckBox512=True,1,0)

So, I want the formula to return 80, 81, 5, or 6 depending upon the values
of H6 and Check Box 512. But I get a #NAME! error. I've tried it with and
without quotes and various other combinations of punctuation but nothing
works.

I guess I just don't know the correct syntax of the formula when using Check
Boxes.

Excel Help doesn't provide an answer and I can't find it on the web.

Thanks, in advance, for your help.

Dan


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default How do I make a checked check box = 1 instead of True?

You can still use the TRUE or FALSE in a formula:

=IF(H6="USD",80,5)+if(CheckBox512=True,1,0)


=IF(H6="USD",80,5)+linked_cell_for_CheckBox512

If the linked cell for CKBX512 is A1:

=IF(H6="USD",80,5)+A1

Biff

"crimsonkng" wrote in message
...
I hope that this is the correct group in which to post this question.

I've written a 6,000-line macro and I've used lots of formulas but I've
never worked with check boxes (until now).

I don't want the Check Box's "cell link" to return True or False, I want
it
to return a value ... "1" if True and a "0" if False because I need to add
it
to another value. In other words, if the box is checked, add 1. If it's
not
checked, add 0 as in:

=IF(H6="USD",80,5)+if(CheckBox512=True,1,0)

So, I want the formula to return 80, 81, 5, or 6 depending upon the values
of H6 and Check Box 512. But I get a #NAME! error. I've tried it with
and
without quotes and various other combinations of punctuation but nothing
works.

I guess I just don't know the correct syntax of the formula when using
Check
Boxes.

Excel Help doesn't provide an answer and I can't find it on the web.

Thanks, in advance, for your help.

Dan




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7,247
Default How do I make a checked check box = 1 instead of True?

I've written a 6,000-line macro and I've used lots of formulas but I've

Just curious, you have a single macro with 6000 lines?!? Have you not heard
of "structured programming"?

=IF(H6="USD",80,5)+if(CheckBox512=True,1,0)


Checkbox512?!? How in the world do you keep track of what checkbox does
what? You didn't give them meaningful names?


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)

"crimsonkng" wrote in message
...
I hope that this is the correct group in which to post this question.

I've written a 6,000-line macro and I've used lots of formulas but I've
never worked with check boxes (until now).

I don't want the Check Box's "cell link" to return True or False, I want
it
to return a value ... "1" if True and a "0" if False because I need to add
it
to another value. In other words, if the box is checked, add 1. If it's
not
checked, add 0 as in:

=IF(H6="USD",80,5)+if(CheckBox512=True,1,0)

So, I want the formula to return 80, 81, 5, or 6 depending upon the values
of H6 and Check Box 512. But I get a #NAME! error. I've tried it with
and
without quotes and various other combinations of punctuation but nothing
works.

I guess I just don't know the correct syntax of the formula when using
Check
Boxes.

Excel Help doesn't provide an answer and I can't find it on the web.

Thanks, in advance, for your help.

Dan




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 42
Default How do I make a checked check box = 1 instead of True?

LOL.

I'm a salesperson, not a programmer. I realize that I've programmed the
macro with a sledgehammer rather than a paintbrush. I have no doubt that
there are better, more efficient ways to program. But at least I've
accomplished what I wanted.

No, I've never heard of structured programming.

And I've never worked with check boxes before. I just discovered 'em.
Excel named it 512 even though it's the first check box that I've added.
I've no idea how or why Excel named it 512.

Thanks for answering the question.

Dan

"Chip Pearson" wrote:

I've written a 6,000-line macro and I've used lots of formulas but I've


Just curious, you have a single macro with 6000 lines?!? Have you not heard
of "structured programming"?

=IF(H6="USD",80,5)+if(CheckBox512=True,1,0)


Checkbox512?!? How in the world do you keep track of what checkbox does
what? You didn't give them meaningful names?


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)

"crimsonkng" wrote in message
...
I hope that this is the correct group in which to post this question.

I've written a 6,000-line macro and I've used lots of formulas but I've
never worked with check boxes (until now).

I don't want the Check Box's "cell link" to return True or False, I want
it
to return a value ... "1" if True and a "0" if False because I need to add
it
to another value. In other words, if the box is checked, add 1. If it's
not
checked, add 0 as in:

=IF(H6="USD",80,5)+if(CheckBox512=True,1,0)

So, I want the formula to return 80, 81, 5, or 6 depending upon the values
of H6 and Check Box 512. But I get a #NAME! error. I've tried it with
and
without quotes and various other combinations of punctuation but nothing
works.

I guess I just don't know the correct syntax of the formula when using
Check
Boxes.

Excel Help doesn't provide an answer and I can't find it on the web.

Thanks, in advance, for your help.

Dan





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 42
Default How do I make a checked check box = 1 instead of True?

Thanks, Biff. That worked.

Ted

"T. Valko" wrote:

You can still use the TRUE or FALSE in a formula:

=IF(H6="USD",80,5)+if(CheckBox512=True,1,0)


=IF(H6="USD",80,5)+linked_cell_for_CheckBox512

If the linked cell for CKBX512 is A1:

=IF(H6="USD",80,5)+A1

Biff

"crimsonkng" wrote in message
...
I hope that this is the correct group in which to post this question.

I've written a 6,000-line macro and I've used lots of formulas but I've
never worked with check boxes (until now).

I don't want the Check Box's "cell link" to return True or False, I want
it
to return a value ... "1" if True and a "0" if False because I need to add
it
to another value. In other words, if the box is checked, add 1. If it's
not
checked, add 0 as in:

=IF(H6="USD",80,5)+if(CheckBox512=True,1,0)

So, I want the formula to return 80, 81, 5, or 6 depending upon the values
of H6 and Check Box 512. But I get a #NAME! error. I've tried it with
and
without quotes and various other combinations of punctuation but nothing
works.

I guess I just don't know the correct syntax of the formula when using
Check
Boxes.

Excel Help doesn't provide an answer and I can't find it on the web.

Thanks, in advance, for your help.

Dan







  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default How do I make a checked check box = 1 instead of True?

You're welcome. Thanks for the feedback!

Biff

"crimsonkng" wrote in message
...
Thanks, Biff. That worked.

Ted

"T. Valko" wrote:

You can still use the TRUE or FALSE in a formula:

=IF(H6="USD",80,5)+if(CheckBox512=True,1,0)


=IF(H6="USD",80,5)+linked_cell_for_CheckBox512

If the linked cell for CKBX512 is A1:

=IF(H6="USD",80,5)+A1

Biff

"crimsonkng" wrote in message
...
I hope that this is the correct group in which to post this question.

I've written a 6,000-line macro and I've used lots of formulas but I've
never worked with check boxes (until now).

I don't want the Check Box's "cell link" to return True or False, I
want
it
to return a value ... "1" if True and a "0" if False because I need to
add
it
to another value. In other words, if the box is checked, add 1. If
it's
not
checked, add 0 as in:

=IF(H6="USD",80,5)+if(CheckBox512=True,1,0)

So, I want the formula to return 80, 81, 5, or 6 depending upon the
values
of H6 and Check Box 512. But I get a #NAME! error. I've tried it with
and
without quotes and various other combinations of punctuation but
nothing
works.

I guess I just don't know the correct syntax of the formula when using
Check
Boxes.

Excel Help doesn't provide an answer and I can't find it on the web.

Thanks, in advance, for your help.

Dan







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
Display the source for a pivot table page field Gary Brown Excel Worksheet Functions 4 November 8th 06 03:02 PM
How can I check if any of the entires is True in a range? Tetsuya Oguma Excel Worksheet Functions 1 March 16th 06 02:37 AM
Do I have to make my times be numbers to get a true average? Leslie Excel Discussion (Misc queries) 1 December 9th 05 02:48 PM
checking that cells have a value before the workbook will close kcdonaldson Excel Worksheet Functions 8 December 5th 05 04:57 PM
Hiding cells on condition Pennington Excel Worksheet Functions 19 April 21st 05 12:30 AM


All times are GMT +1. The time now is 03:19 PM.

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"