Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Always have cells add up to 100

I have range of cells that are the same right now, and they add up to
100:

7.142857
7.142857
7.142857
7.142857
7.142857
7.142857
7.142857
7.142857
7.142857
7.142857
7.142857
7.142857
7.142857
7.142857

100

I would like to be able to change on of those values, and the others
adjust to still add up to 100. Any ideas?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Always have cells add up to 100

Right click sheet tabview codeinsert thisSAVE workbook

Private Sub Worksheet_Change(ByVal Target As Range)
Set myrng = Range("e2:e15")
Application.EnableEvents = False
If Not Intersect(Target, myrng) Is Nothing Then
x = 100 - Target
For Each c In myrng
If c.Address < Target.Address Then c.Value = x / 13
Next
End If
Application.EnableEvents = True
End Sub


--
Don Guillett
SalesAid Software

"Jeff" wrote in message
oups.com...
I have range of cells that are the same right now, and they add up to
100:

7.142857
7.142857
7.142857
7.142857
7.142857
7.142857
7.142857
7.142857
7.142857
7.142857
7.142857
7.142857
7.142857
7.142857

100

I would like to be able to change on of those values, and the others
adjust to still add up to 100. Any ideas?



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
Excel: match two cells in one sheet to two cells in another and return a third cells value Spence Excel Worksheet Functions 3 February 13th 11 05:33 AM
compare 2 column cells and return the adjacent columns cells data of the cell trebor57 Excel Worksheet Functions 1 February 1st 11 02:54 PM
join data in multiple cells when adjoining cells match criteria ?? angiec50 Excel Worksheet Functions 1 October 6th 09 10:27 AM
Skip cells with TAB/SHIFT+TAB but allow arrow keys/mouse selection of skipped cells Wescotte Excel Programming 1 June 6th 05 07:00 PM
trying to create an (almost) circular formula between cells and data validated cells with lists KR Excel Worksheet Functions 0 May 12th 05 07:21 PM


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