+ Reply to Thread
Results 1 to 8 of 8

Insert average value into missing value cells

  1. #1
    Registered User
    Join Date
    11-12-2013
    Location
    Lithuania
    MS-Off Ver
    Excel 2003
    Posts
    4

    Insert average value into missing value cells

    Hello!

    So I have column which has random missing numeric data. Is there a simple way to automatically insert the average value of all non missing values into those cells with missing values? The column contains a lot of data, so I don't want to do it all manually, how else can I do it?

    Thank you!

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Insert average value into missing value cells

    Well after you calculate the average you could do a find and replace finding all blank cells and replacing with the "average" you calculated.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Insert average value into missing value cells

    I think what you want is something like,

    A1:A100
    a range of numbers with scattered empty cells.

    B1:100
    range of numbers with falsified data points

    B1 = IF(A1<>"", A1, AVERAGE($A$1:$A$100))
    pull down

    Now B1:B100 has the output range you need.

    Does that do what you want?

  4. #4
    Registered User
    Join Date
    11-12-2013
    Location
    Lithuania
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Insert average value into missing value cells

    Quote Originally Posted by Sambo kid View Post
    Well after you calculate the average you could do a find and replace finding all blank cells and replacing with the "average" you calculated.
    Wow, didn't thought about that but it's very simple idea and should really work!

    Quote Originally Posted by ben_hensel View Post
    I think what you want is something like,

    A1:A100
    a range of numbers with scattered empty cells.

    B1:100
    range of numbers with falsified data points

    B1 = IF(A1<>"", A1, AVERAGE($A$1:$A$100))
    pull down

    Now B1:B100 has the output range you need.

    Does that do what you want?
    Your formula makes sense, but how do I insert all values automatically? I mean imagine this is my column, just much larger: http://i.imgur.com/5E943Ce.png. I need to automatically insert average of existing values into missing ones. That said Sambo Kid's advice is simple and should do the trick, but since I have several columns I need to define "missing value" for each of them so all of them won't change with Replace All command.

  5. #5
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Insert average value into missing value cells

    Just do your find and replace highlighting only the column/columns you want.

    EDIT: Oh, and thanks for the rep points.

  6. #6
    Registered User
    Join Date
    11-12-2013
    Location
    Lithuania
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Insert average value into missing value cells

    Quote Originally Posted by Sambo kid View Post
    Just do your find and replace highlighting only the column/columns you want.

    EDIT: Oh, and thanks for the rep points.
    worked perfectly. Sometimes you just need to sit and think, because it's so simple haha

  7. #7
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Insert average value into missing value cells

    Great, and don't forget to mark the post as solved if that did it for you.
    (top of the post under thread tools)

  8. #8
    Registered User
    Join Date
    11-12-2013
    Location
    Lithuania
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Insert average value into missing value cells

    done, thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Compare two columns on separate sheet, if missing, insert missing data
    By lilvictorians in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 04-03-2019, 11:44 PM
  2. Copy Paste the Missing Values in a Specified Cells and Insert the Rows into a Report
    By judeprem in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-30-2013, 01:46 PM
  3. Excel Macro to find missing dates and insert missing date as blank row
    By JevaMarie in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-26-2013, 11:08 AM
  4. Insert Missing Rows, Fill Cells variously
    By jrosier in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-03-2012, 04:15 AM
  5. Insert new rows between existing cells with missing sequential dates
    By madball87 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-09-2011, 11:06 AM

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