#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 58
Default Macro + IF Function?

Hi,
I'm extremely new to using macro's in excel. I haven't been able to do more
than recording one and simply editing it in the vb editor.

What i want is this. I have on sheet 1 six check boxes. What i want the
macro to do is this.

Checkbox 1 is checked

I want cell D66:D80 to become something i define (which i guess i could
record in excel).

If it's unchecked this has to be gone. When i check checkbox 2 it does
exactly the same.

So far it's not a big problem. However, now i want to check 2 (or 3) boxes.
For example.

Checkbox 1 checked - D66:D80 become my values
Checkbox 2 checked - It first checks if D66:d80 is empty, if it is. It puts
it's info on D66:D80, if it is not empty it puts the info in F66:F80.

(Checkbox 3 checked - It first checks if D66:d80 is empty, then if F66:F80
is empty, then it puts it at the closest possible empty range)

Idem Dito for Checkbox 3,4,5,6. It will have to handle a maximum of 4
checked checkboxes.

Any idea on how to do this?

Thanks for any effort put into this.

Greetz,
Gunti

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 58
Default Macro + IF Function?

I have another question for anyone interested in helping.

How can i use the checkbox to use a different macro when it's checked or
unchecked? In this example: i want to delete the info when it's being
unchecked. And add the info to d66:d80 when it is checked.

Greetz,
Gunti

"Gunti" wrote:

Hi,
I'm extremely new to using macro's in excel. I haven't been able to do more
than recording one and simply editing it in the vb editor.

What i want is this. I have on sheet 1 six check boxes. What i want the
macro to do is this.

Checkbox 1 is checked

I want cell D66:D80 to become something i define (which i guess i could
record in excel).

If it's unchecked this has to be gone. When i check checkbox 2 it does
exactly the same.

So far it's not a big problem. However, now i want to check 2 (or 3) boxes.
For example.

Checkbox 1 checked - D66:D80 become my values
Checkbox 2 checked - It first checks if D66:d80 is empty, if it is. It puts
it's info on D66:D80, if it is not empty it puts the info in F66:F80.

(Checkbox 3 checked - It first checks if D66:d80 is empty, then if F66:F80
is empty, then it puts it at the closest possible empty range)

Idem Dito for Checkbox 3,4,5,6. It will have to handle a maximum of 4
checked checkboxes.

Any idea on how to do this?

Thanks for any effort put into this.

Greetz,
Gunti

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
Is there a Function or Macro for This? Marilyn Excel Discussion (Misc queries) 6 November 6th 07 03:21 AM
Sub Macro vrs Function Macro Auto Start Pat Excel Discussion (Misc queries) 7 June 6th 07 09:53 PM
Function or macro? Rob N Excel Worksheet Functions 0 August 12th 06 08:14 PM
Do I need a macro or just a function? Kara Excel Worksheet Functions 3 April 28th 06 04:52 PM
How Do I (Macro Function)? Swivel Excel Worksheet Functions 1 November 3rd 04 12:21 AM


All times are GMT +1. The time now is 10:52 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"