Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default How to make a more interactive spreadsheet?

Hello all. So here are 2 things I am trying to do.

I would like to make a worksheet function or process, that will change an
entire row green when 2 values in that row match. For instance K1 cell value
is 1 and R1 cell value is 1, the line would turn green, if it was a 0 in R1
then nothing would happen. Heres the catch though, I want that to happen in
real time. So when I type 1 and hit enter, the line would turn green.

Heres the second thing I want to do!
I would like to make some check boxes, that when checked will turn a line
red (or another color). I would also like to do this for several lines, maybe
200, once the macro is made for that, is there a way to attach it to its
specific cell, without having to retype a macro 200 times?

Thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default How to make a more interactive spreadsheet?

Select all of row 1 then open the Format, Conditional Formatting dialog.
Change the "Cell value is" to "Formula is" and paste in this formula:

=MAX(COUNTIF(1:1,1:1))1

and then set the format you want when this formula is true.

--
Jim Rech
Excel MVP
"havocdragon" wrote in message
...
| Hello all. So here are 2 things I am trying to do.
|
| I would like to make a worksheet function or process, that will change an
| entire row green when 2 values in that row match. For instance K1 cell
value
| is 1 and R1 cell value is 1, the line would turn green, if it was a 0 in
R1
| then nothing would happen. Heres the catch though, I want that to happen
in
| real time. So when I type 1 and hit enter, the line would turn green.
|
| Heres the second thing I want to do!
| I would like to make some check boxes, that when checked will turn a line
| red (or another color). I would also like to do this for several lines,
maybe
| 200, once the macro is made for that, is there a way to attach it to its
| specific cell, without having to retype a macro 200 times?
|
| Thanks in advance


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How to make a more interactive spreadsheet?

Use checkboxes from the Forms toolbar. Assign them all to a single macro
similar to

Sub cbox_click()
Dim cbox as Checkbox
Dim rng as Range
set cbox = ActiveSheet.Checkboxes(application.Caller)
set rng = cbox.TopLeftCell
if cbox.Value = xlOn then
cbox.EntireRow.Interior.ColorIndex = 5
else
cbox.EntireRow.Interior.ColorIndex = xlNone
end if
End Sub

--
Regards,
Tom Ogilvy

"havocdragon" wrote in message
...
Hello all. So here are 2 things I am trying to do.

I would like to make a worksheet function or process, that will change an
entire row green when 2 values in that row match. For instance K1 cell

value
is 1 and R1 cell value is 1, the line would turn green, if it was a 0 in

R1
then nothing would happen. Heres the catch though, I want that to happen

in
real time. So when I type 1 and hit enter, the line would turn green.

Heres the second thing I want to do!
I would like to make some check boxes, that when checked will turn a line
red (or another color). I would also like to do this for several lines,

maybe
200, once the macro is made for that, is there a way to attach it to its
specific cell, without having to retype a macro 200 times?

Thanks in advance



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default How to make a more interactive spreadsheet?

Jim, thanks that helps alot. Im assuming that on row 7 for instance i would
change the 1:1,1:1 to 7:7,7:7? Unfortuneatly i need to different cells to
meet that criteria. How would i do if if I only wanted that to apply to N7
and T7?

Tom, almost got this to work, however this line

cbox.EntireRow.Interior.ColorIndex = 5

Keeps comming up as invalid context. also you dont need this line

cbox.EntireRow.Interior.ColorIndex = xlNone

You could just do the Else, then End if =)


"Tom Ogilvy" wrote:

Use checkboxes from the Forms toolbar. Assign them all to a single macro
similar to

Sub cbox_click()
Dim cbox as Checkbox
Dim rng as Range
set cbox = ActiveSheet.Checkboxes(application.Caller)
set rng = cbox.TopLeftCell
if cbox.Value = xlOn then
cbox.EntireRow.Interior.ColorIndex = 5
else
cbox.EntireRow.Interior.ColorIndex = xlNone
end if
End Sub

--
Regards,
Tom Ogilvy

"havocdragon" wrote in message
...
Hello all. So here are 2 things I am trying to do.

I would like to make a worksheet function or process, that will change an
entire row green when 2 values in that row match. For instance K1 cell

value
is 1 and R1 cell value is 1, the line would turn green, if it was a 0 in

R1
then nothing would happen. Heres the catch though, I want that to happen

in
real time. So when I type 1 and hit enter, the line would turn green.

Heres the second thing I want to do!
I would like to make some check boxes, that when checked will turn a line
red (or another color). I would also like to do this for several lines,

maybe
200, once the macro is made for that, is there a way to attach it to its
specific cell, without having to retype a macro 200 times?

Thanks in advance




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default How to make a more interactive spreadsheet?

Gotta throw a bump up in here =) need to get this info =)

"havocdragon" wrote:

Jim, thanks that helps alot. Im assuming that on row 7 for instance i would
change the 1:1,1:1 to 7:7,7:7? Unfortuneatly i need to different cells to
meet that criteria. How would i do if if I only wanted that to apply to N7
and T7?

Tom, almost got this to work, however this line

cbox.EntireRow.Interior.ColorIndex = 5

Keeps comming up as invalid context. also you dont need this line

cbox.EntireRow.Interior.ColorIndex = xlNone

You could just do the Else, then End if =)


"Tom Ogilvy" wrote:

Use checkboxes from the Forms toolbar. Assign them all to a single macro
similar to

Sub cbox_click()
Dim cbox as Checkbox
Dim rng as Range
set cbox = ActiveSheet.Checkboxes(application.Caller)
set rng = cbox.TopLeftCell
if cbox.Value = xlOn then
cbox.EntireRow.Interior.ColorIndex = 5
else
cbox.EntireRow.Interior.ColorIndex = xlNone
end if
End Sub

--
Regards,
Tom Ogilvy

"havocdragon" wrote in message
...
Hello all. So here are 2 things I am trying to do.

I would like to make a worksheet function or process, that will change an
entire row green when 2 values in that row match. For instance K1 cell

value
is 1 and R1 cell value is 1, the line would turn green, if it was a 0 in

R1
then nothing would happen. Heres the catch though, I want that to happen

in
real time. So when I type 1 and hit enter, the line would turn green.

Heres the second thing I want to do!
I would like to make some check boxes, that when checked will turn a line
red (or another color). I would also like to do this for several lines,

maybe
200, once the macro is made for that, is there a way to attach it to its
specific cell, without having to retype a macro 200 times?

Thanks in advance






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How to make a more interactive spreadsheet?

Sub cbox_click()
Dim cbox As CheckBox
Dim rng As Range
Set cbox = ActiveSheet.CheckBoxes(Application.Caller)
Set rng = cbox.TopLeftCell
If cbox.Value = xlOn Then
rng.EntireRow.Interior.ColorIndex = 5
Else
rng.EntireRow.Interior.ColorIndex = xlNone
End If
End Sub

Worked fine for me. If you never want the line not be highlighted, I guess
you can remove the xlNone.

--
Regards,
Tom Ogilvy

"havocdragon" wrote in message
...
Gotta throw a bump up in here =) need to get this info =)

"havocdragon" wrote:

Jim, thanks that helps alot. Im assuming that on row 7 for instance i

would
change the 1:1,1:1 to 7:7,7:7? Unfortuneatly i need to different cells

to
meet that criteria. How would i do if if I only wanted that to apply to

N7
and T7?

Tom, almost got this to work, however this line

cbox.EntireRow.Interior.ColorIndex = 5

Keeps comming up as invalid context. also you dont need this line

cbox.EntireRow.Interior.ColorIndex = xlNone

You could just do the Else, then End if =)


"Tom Ogilvy" wrote:

Use checkboxes from the Forms toolbar. Assign them all to a single

macro
similar to

Sub cbox_click()
Dim cbox as Checkbox
Dim rng as Range
set cbox = ActiveSheet.Checkboxes(application.Caller)
set rng = cbox.TopLeftCell
if cbox.Value = xlOn then
cbox.EntireRow.Interior.ColorIndex = 5
else
cbox.EntireRow.Interior.ColorIndex = xlNone
end if
End Sub

--
Regards,
Tom Ogilvy

"havocdragon" wrote in message
...
Hello all. So here are 2 things I am trying to do.

I would like to make a worksheet function or process, that will

change an
entire row green when 2 values in that row match. For instance K1

cell
value
is 1 and R1 cell value is 1, the line would turn green, if it was a

0 in
R1
then nothing would happen. Heres the catch though, I want that to

happen
in
real time. So when I type 1 and hit enter, the line would turn

green.

Heres the second thing I want to do!
I would like to make some check boxes, that when checked will turn a

line
red (or another color). I would also like to do this for several

lines,
maybe
200, once the macro is made for that, is there a way to attach it to

its
specific cell, without having to retype a macro 200 times?

Thanks in advance





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
Can a spreadsheet be saved as interactive webpage El Plate New Users to Excel 3 July 15th 09 08:16 PM
How to make Excel More Interactive and Dynamic banker123 Excel Discussion (Misc queries) 1 December 11th 07 03:12 AM
Inserting an interactive spreadsheet into a webpage RichCo Excel Discussion (Misc queries) 0 November 19th 07 04:50 PM
how to make a workbook an interactive web page? DC Excel Discussion (Misc queries) 3 November 8th 05 09:40 PM
How do I make a spreadsheet interactive on a website? Regina Excel Discussion (Misc queries) 1 October 8th 05 04:53 AM


All times are GMT +1. The time now is 02:45 PM.

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

About Us

"It's about Microsoft Excel"