Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Averaging only cells with numbers

I have a spreadsheet that is assigning a number to a cell based on a
VLOOKUP. For some cells, the number doesn't exist yet, because we
haven't arrived at that moment in time yet (some cells will be
populated in the future). In those cases, the VLOOKUP'ed cell is
displaying a "#N/A". I want to average a range of the cells that have
numbers in them. For instance:

Cell K3 = 3
Cell K4 = 4
Cell K5 = 5
Cell K6 = #N/A

Obviously, I could do an "=AVERAGE(K3:K5)" and when there's data in
K6, change the formula to include K6 (=AVERAGE(K3:K6). However I
don't want to do that. I want this spreadsheet to be usable by
someone who doesn't manage formulas. I just want her to plug in the
letters, that the VLOOKUP assigns a number to, and have the average
calculate.

TIA.
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Averaging only cells with numbers

On Apr 15, 7:17*pm, Dave Peterson wrote:
I'd change the =vlookup() formula:

=if(isna(vlookup(...)),"Future",vlookup(...))

Then the =average() will work ok.





wrote:

I have a spreadsheet that is assigning a number to a cell based on a
VLOOKUP. *For some cells, the number doesn't exist yet, because we
haven't arrived at that moment in time yet (some cells will be
populated in the future). *In those cases, the VLOOKUP'ed cell is
displaying a "#N/A". *I want to average a range of the cells that have
numbers in them. *For instance:


Cell K3 = 3
Cell K4 = 4
Cell K5 = 5
Cell K6 = #N/A


Obviously, I could do an "=AVERAGE(K3:K5)" and when there's data in
K6, change the formula to include K6 (=AVERAGE(K3:K6). *However I
don't want to do that. *I want this spreadsheet to be usable by
someone who doesn't manage formulas. *I just want her to plug in the
letters, that the VLOOKUP assigns a number to, and have the average
calculate.


TIA.


--

Dave Peterson- Hide quoted text -

- Show quoted text -


That did it, thanks!!

I do have another question though. An unintended consequence of this
(that I never expected) was that I have charted the averages and
created a trendline on that chart. Now, the trendline runs across the
entire set of data, including the "future" data which isn't populated
yet. This means that my trendline goes to zero. So, can I set up a
trendline to only look at numbers greater than zero? Or as a
workaround, can I define the set of data that the trendline will
represent? If the answer to these questions is "no", I'll just drop
the idea of a trendline. But I wanted to ask.
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Averaging only cells with numbers

Yep. You can avoid the problem by using =na()'s in the cells that aren't ready.

Maybe you can use a hidden column with formulas and use that to plot your graph:

=if(isnumeric(k3),k3,na())


wrote:

On Apr 15, 7:17 pm, Dave Peterson wrote:
I'd change the =vlookup() formula:

=if(isna(vlookup(...)),"Future",vlookup(...))

Then the =average() will work ok.





wrote:

I have a spreadsheet that is assigning a number to a cell based on a
VLOOKUP. For some cells, the number doesn't exist yet, because we
haven't arrived at that moment in time yet (some cells will be
populated in the future). In those cases, the VLOOKUP'ed cell is
displaying a "#N/A". I want to average a range of the cells that have
numbers in them. For instance:


Cell K3 = 3
Cell K4 = 4
Cell K5 = 5
Cell K6 = #N/A


Obviously, I could do an "=AVERAGE(K3:K5)" and when there's data in
K6, change the formula to include K6 (=AVERAGE(K3:K6). However I
don't want to do that. I want this spreadsheet to be usable by
someone who doesn't manage formulas. I just want her to plug in the
letters, that the VLOOKUP assigns a number to, and have the average
calculate.


TIA.


--

Dave Peterson- Hide quoted text -

- Show quoted text -


That did it, thanks!!

I do have another question though. An unintended consequence of this
(that I never expected) was that I have charted the averages and
created a trendline on that chart. Now, the trendline runs across the
entire set of data, including the "future" data which isn't populated
yet. This means that my trendline goes to zero. So, can I set up a
trendline to only look at numbers greater than zero? Or as a
workaround, can I define the set of data that the trendline will
represent? If the answer to these questions is "no", I'll just drop
the idea of a trendline. But I wanted to ask.


--

Dave Peterson
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
Averaging numbers in query. Duser Excel Discussion (Misc queries) 3 August 8th 06 12:05 AM
Averaging Text vs. Numbers NKDodd Excel Worksheet Functions 5 April 27th 06 03:58 PM
Averaging the top 2/3 highest numbers pdberger Excel Worksheet Functions 3 January 6th 06 07:38 PM
Averaging different numbers of cells Brad Hubeny Excel Worksheet Functions 4 June 29th 05 11:25 PM
Averaging Numbers when 2 numbers in one cell Ourania Excel Worksheet Functions 8 January 12th 05 06:40 PM


All times are GMT +1. The time now is 06:01 AM.

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"