Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
MMA MMA is offline
external usenet poster
 
Posts: 1
Default making cells change relative to each other, cant figure out

my question/problem is kind of weird but here goes. I'm praying
someone smart and nice with some vba knowledge can help

I'm doing a food data worksheet for my nutrition class

I have five columns per food

quantity, calories. protein, carbs, fat

the foods are also in rows

What i want to do is enter the food data in for each food and
then have it so later on if i want to change a value in any of
the columns, the rest will move relative to the one

for example, if 1 oz chicken breast is 46 calories, 1 gram fat,
0 carb, 9 protein. I can change the protein to be 25 (multiplied
by 2.778) the rest will multipy their current values by 2.7778
automatically.

I talked to some people and heard vba is probably the only way
to do it and i am clueless when it comes to that. Any help with
an appropriate script for what im trying to do would be much
appreciated

thanks in advance

----------------------------------------------
Posted with NewsLeecher v2.3 Final
* Binary Usenet Leeching Made Easy
* http://www.newsleecher.com/?usenet
----------------------------------------------

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 138
Default making cells change relative to each other, cant figure out

One way that you could do this without delving into the depths of VBA
is by using the SOLVER add-in.

For each food relate all other "properties" to it's weight - if cell
B2 is "Chicken Breast" and C2 is "Weight" (= 1oz) then D2 (say) is
Protein (=C2*9). All other properties would need to be similarly
related. All foods would need to be 'Calibrated' against 1 oz.

To increase all values to match Protein =25 run Solver with a Target
Cell of $D$2, To Equal a Value of 25 by Changing Cells $C$2. Because
all other cells are related to C2 when Solver finds the solution for
Protein all of the other values for that food will be updated.

For this to work the Solver add-in must be on your machine and it must
also be enabled - tick the Solver add-in box under <tools<add-ins.

All of this of course could be achieved using VBA but if you just want
a quick and easy solution ....

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
making copied cells change with change in original cell Jennifer Mcdermeit Excel Worksheet Functions 2 July 20th 06 04:58 PM
making cells change relative to each other? cant figure out help plz MMA Excel Discussion (Misc queries) 7 June 14th 06 12:49 AM
making cells change relative to each other? cant figure it out MMA Excel Worksheet Functions 1 June 13th 06 08:09 AM
making cells change relative to each other? MMA Excel Worksheet Functions 0 June 13th 06 05:18 AM


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