+ Reply to Thread
Results 1 to 8 of 8

Populating Cells Automatically Based On Other Cells

  1. #1
    Registered User
    Join Date
    04-26-2013
    Location
    Everywhere
    MS-Off Ver
    Excel 2007
    Posts
    14

    Populating Cells Automatically Based On Other Cells

    I need to have excel 2007 display "N/A" in cells C$4:V$4 if the specified conditions are not met; like in this formula.

    =IF(OR(C$4={"a","b","c","d","e","f","g","h","I","j","k"}),"","N/A")Sample Workbook.xlsx

    But I need it to not be in the cell array so I can input a date (manually) in the blank cell without loosing the "code", and I need it to apply to all C$4 rows across the workbook.

    I do not know much about VBA so please be as detailed as possible.

    Attached is a sample workbook that has been sanitized and srunk to the area I am working with.

    Thank you.

  2. #2
    Valued Forum Contributor
    Join Date
    11-20-2012
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2010
    Posts
    597

    Re: Populating Cells Automatically Based On Other Cells

    But I need it to not be in the cell array so I can input a date (manually) in the blank cell
    i don't quite understand this part. you want to be able to input a date in say Sheet1!G4 of your sample workbook but keep the formula? what's the point since you can just copy and paste the formula back if you delete the date? I'm sure there is a way to do this, although I don't know how off the top of my head, i'll have to do some thinking

  3. #3
    Registered User
    Join Date
    04-26-2013
    Location
    Everywhere
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Populating Cells Automatically Based On Other Cells

    Quote Originally Posted by scott.s.fower View Post
    i don't quite understand this part. you want to be able to input a date in say Sheet1!G4 of your sample workbook but keep the formula? what's the point since you can just copy and paste the formula back if you delete the date? I'm sure there is a way to do this, although I don't know how off the top of my head, i'll have to do some thinking
    Yes that is what I am after. I will not be the only person using the workbook. I want it to remain constant so that other people do not destroy the formula.

  4. #4
    Valued Forum Contributor
    Join Date
    11-20-2012
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2010
    Posts
    597

    Re: Populating Cells Automatically Based On Other Cells

    the only way i can think of doing it is with a macro, if the cell = blank, then the macro will auto fill the original formula, otherwise if it is filled in with a date then it will just be the manually input date

  5. #5
    Valued Forum Contributor
    Join Date
    11-20-2012
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2010
    Posts
    597

    Re: Populating Cells Automatically Based On Other Cells

    this should work, although i'm guessing that instead of a-k, you will have some other values, so you will have to update the code accordingly
    this code goes on the actual sheet code section, not a module

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    04-26-2013
    Location
    Everywhere
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Populating Cells Automatically Based On Other Cells

    Quote Originally Posted by scott.s.fower View Post
    this should work, although i'm guessing that instead of a-k, you will have some other values, so you will have to update the code accordingly
    this code goes on the actual sheet code section, not a module

    Please Login or Register  to view this content.
    This works Great except it eats my % calculation code and replaces it with the N/A Code. Is there a way to limit the area this applies to?

  7. #7
    Valued Forum Contributor
    Join Date
    11-20-2012
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2010
    Posts
    597

    Re: Populating Cells Automatically Based On Other Cells

    try this
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    04-26-2013
    Location
    Everywhere
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Populating Cells Automatically Based On Other Cells

    Now I get "Run-time eror '91': Object variable or With block variable not set" if I modify a cell that is out of the defined range. Does it need an Else statement? Thank you for your help.

+ 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