Excel Make conditional formmating appear as a list in a cell -


i have dataset , have 2 extreme numbers use conditonal formatting work out if numbers in data set dont fit criteria, in formula use below.

=or(b3<$e$8,b3>$e$7) 

im wondering way of making list of cells dont fit criteria appear list, in cell.

for example, if had list of 1,2,3,4,5,6,7,8,9 , 2 numbers 3 , 7 fromula gerneate output:

1,2,8,9 

enter following user defined function in standard module:

public function makealist(rng range, u long, l long) string   dim r range, s string   each r in rng     if r.value < l or r.value > u       s = s & "," & r.value     end if   next r   makealist = mid(s, 2) end function 

and use range of values:

enter image description here

note:

the first argument range of values.
the second argument upper limit.
the third argument lower limit.

user defined functions (udfs) easy install , use:

  1. alt-f11 brings vbe window
  2. alt-i alt-m opens fresh module
  3. paste stuff in , close vbe window

if save workbook, udf saved it. if using version of excel later 2003, must save file .xlsm rather .xlsx

to remove udf:

  1. bring vbe window above
  2. clear code out
  3. close vbe window

to use udf excel:

=makealist(a1:a100,b1,c1)

to learn more macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

and

http://msdn.microsoft.com/en-us/library/ee814735(v=office.14).aspx

and specifics on udfs, see:

http://www.cpearson.com/excel/writingfunctionsinvba.aspx

macros must enabled work!


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -