View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Marcelo Marcelo is offline
external usenet poster
 
Posts: 1,047
Default excel formula - possibly visual basic method

hi David,

assuming that you have the actual figures on the B column, the forecast
figures on the C column and the variance on the D column. you can hide the
forecast column if it's necessary for your proposal.

on D column use the formula
=b2-c2

and use a conditional format to set the cell red or green:
click on format menu chose conditional format, on the drop down chose bigger
than - on the box type 0 format as you need color, font color, borders
add an new condition chose lower than - on the box type 0


hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"David" escreveu:

I need to set up a quite a complicated spread sheet. This is the senario: say
my sales figure for monday is £50 (which is my target). However my actual
sales figure for monday is £40. How do i get the cell to show the difference
between my forecast(target) and my actual having predefined the cell with my
target sales figure so that when i type the actual sales figure in it will
automatically show the difference(+/-). How do i predefine the cell with the
forecast sales figure for a cell?

In addition to this i would like to know how if i hit the sales target do i
get the cell to show green. And if the sales target is missed how do i get
the cell to show red without having to change the cell each time.

What hopefully should happen is that as in the above scenario if for the
monday i typed in the actual sales figure as £40, the cell will hopefully
show -£10 with the cell baground turning red. If for example i typed in £60
for monday it would show +£10 and the cell would turn green. I hope to repeat
this process for the rest of the week with different forecast figures! Many
thanks