Mourning the loss of our friend, WhitPhil.
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
All Other Software
Tag Cloud
access audio black screen blue screen boot bsod connection crash dell desktop driver dvd email error excel excel 2003 firefox hard drive hardware hdmi hijackthis internet itunes keyboard laptop malware monitor network networking outlook problem ram recovery router screen slow sound spyware tdlwsp.dll trojan vba video virus vista vundo windows windows 7 windows vista windows xp wireless
Search
Search for:
Tech Support Guy Forums > Software & Hardware > All Other Software >
Excel Formatting

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

 
Thread Tools
MacShand's Avatar
Junior Member with 3 posts.
 
Join Date: Oct 2009
Experience: Beginner
02-Nov-2009, 02:37 PM #1
Excel Formatting
Hi there

This is going to be quite long winded so apologies in advance.

I have a worksheet in excel working brilliantly with all kinds of codes written in and everything's ok...apart from one thing

I have a column with check boxes in them. When checked, they apply formatting to a cell in the same row. So, Check Box 35 when checked, turns A35 Green and C35 Green.

However, if I need to move rows, the check boxes still correspond to their pre-set row.

i.e. If i move Row 35 (including Check Box 35) to become Row 4, Check Box 35 still applies to A35 and C35 which no longer makes sense.

I'd like the check box to apply to the row it's in regardless of where I move it to.

Hope that makes sense and suggestions would be brilliant!

Thanks

M
redoak's Avatar
Computer Specs
Distinguished Member with 5,357 posts.
 
Join Date: Jun 2004
Location: West Glenville, Sch'dy Cty, NY
Experience: Intermediate
03-Nov-2009, 07:49 AM #2
If help doesn't appear, click "Report" in the lower right and ask that your Thread be transfered to the "Business Applications" Forum.

{redoak}
wedonttakecrap's Avatar
Junior Member with 7 posts.
 
Join Date: Nov 2009
Experience: Advanced
03-Nov-2009, 01:48 PM #3
I'd recommend using the Indirect() function and making your cell references using R1C1 style.

for example if I wanted to make a formula to sum cells in the next four columns in the same row, my formula would be : =SUM(INDIRECT("c[1]:c[4]",FALSE))

That formula would work no matter where you move it to. It's useful especially in workbooks where rows and columns are moved or deleted frequently.

More detail as to which version of Excel you are using and if your check box is a form control or ActiveX control, and I could elaborate a little more. My preference is to Form Controls to avoid slowdowns with VBA.

happy hacking!
Reply Bookmark and Share

Tags
code, excel

Smart Search

Find your solution!



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.

Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 06:00 PM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.
Powered by Cermak Technologies, Inc.