+ Reply to Thread
Results 1 to 6 of 6

Automatically Adjusting a Column with a Formula

  1. #1
    Registered User
    Join Date
    04-09-2008
    Posts
    4

    Automatically Adjusting a Column with a Formula

    I am looking for a way to make a formula column automatically adjust to the numbers in the cell, without having to adjust it myself.
    Column B: W/H SUMMARY
    Column C: TAX PC
    Column D: Formula: =SUM(B3-C3)
    *Please see attached document for a look at my excel file*

    Before I entered the 1,000,000 in Column B, col. D showed 0.00. When I enter a number into col. B or col. C I want col. D to adjust to fit. For example, right now it sould show 1,000,000. BUT, when I enter 1,000,000 into col. C I want col. D to go back to the smaller size.
    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Contributor Portuga's Avatar
    Join Date
    02-20-2004
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    852
    You can add the following code to your sheet:

    Please Login or Register  to view this content.
    Right click on the sheet name and select "see code" and paste it there.
    You will need to have this code in every sheet you wish automatic column/row ajustment
    Last edited by Portuga; 04-09-2008 at 01:45 PM.
    If you found the solution to your question. Mark the thread as "Solved"
    Thank everyone that helped you with a valid solution by clicking on their

    There is no such thing as a problem, only a temporary lack of a solution

  3. #3
    Registered User
    Join Date
    04-09-2008
    Posts
    4
    Worked perfect! Thanks!!

    Quote Originally Posted by Portuga
    You can add the following code to your sheet:

    Please Login or Register  to view this content.
    Right click on the sheet name and select "see code" and paste it there.
    You will need to have this code in every sheet you wish automatic column/row ajustment

  4. #4
    Registered User
    Join Date
    04-09-2008
    Posts
    4
    Ok. now there was a problem. It worked great until I protected the sheet. The only columns that people can enter data into are b & c. So, when I protect it run-time error 1004 pops up and when I click "debug" to see the problem, it highlights ".Rows.AutoFit"

    Any ideas?
    Thanks again!

    Quote Originally Posted by Portuga
    You can add the following code to your sheet:

    Please Login or Register  to view this content.
    Right click on the sheet name and select "see code" and paste it there.
    You will need to have this code in every sheet you wish automatic column/row ajustment

  5. #5
    Registered User
    Join Date
    04-09-2008
    Posts
    4
    bump .

  6. #6
    Forum Contributor Portuga's Avatar
    Join Date
    02-20-2004
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    852
    try

    Please Login or Register  to view this content.

    Changing correspondingly the columns you want.

    First you should select the columns B and C and uncheck "Blocked" in "format" "cells"

    You can now protect your sheet (You must allow for Column format in your protection)
    Last edited by Portuga; 04-09-2008 at 04:27 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1