RumJellybean
New Member
- Joined
- Apr 20, 2009
- Messages
- 16
I am using a formula to gather data from specified "DATA ENTRY" cell ranges(sheet1!a1:a30) and (sheet2!a1:a30), Into one "SUMMARY" range (sheet6!a1:a60). The cells in the "DATA ENTRY" ranges will have varying ammounts of data input into them. In combination, I am also using a User-Defined function named "NoBlanks" that eliminates blanks in the information that is gathered from the entry ranges.
I select the summary range and use *shift+ctrl+enter* to imbed the formula below, which works just fine.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com
ffice
ffice" /><o
></o
>
=noblanks(Sheet1!A1:A30,Sheet2!A1:A30)<o
></o
>
This user function gets rid of the blanks for me.
Option Base 1
Function NoBlanks(ParamArray rgs()) As Variant
Dim v() As Variant
Application.Volatile True
For i = LBound(rgs) To UBound(rgs)
For j = 1 To Application.CountA(rgs(i))
num = num + 1
ReDim Preserve v(num)
v(num) = rgs(i)(j)
Next
Next
NoBlanks = Application.Transpose(v)
End Function <o
></o
>
The problem is that if any data entry cells are empty, I get the good ole *n/a error on the summary sheet. I tried the classic:
=if(isna(noblanks(Sheet1!A1:A20,Sheet2!A1:A20)),"",noblanks(Sheet1!A1:A20,Sheet2!A1:A20))
Also I tried conditional formatting via the "Use formula" option with this =isna(Sheet1!A1:A20,Sheet2!A1:A20) and changed the format to white text. It did not work either and i'm supposing it has something to do with it being an array. Any suggestions?
I select the summary range and use *shift+ctrl+enter* to imbed the formula below, which works just fine.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com




=noblanks(Sheet1!A1:A30,Sheet2!A1:A30)<o


This user function gets rid of the blanks for me.
Option Base 1
Function NoBlanks(ParamArray rgs()) As Variant
Dim v() As Variant
Application.Volatile True
For i = LBound(rgs) To UBound(rgs)
For j = 1 To Application.CountA(rgs(i))
num = num + 1
ReDim Preserve v(num)
v(num) = rgs(i)(j)
Next
Next
NoBlanks = Application.Transpose(v)
End Function <o


The problem is that if any data entry cells are empty, I get the good ole *n/a error on the summary sheet. I tried the classic:
=if(isna(noblanks(Sheet1!A1:A20,Sheet2!A1:A20)),"",noblanks(Sheet1!A1:A20,Sheet2!A1:A20))
Also I tried conditional formatting via the "Use formula" option with this =isna(Sheet1!A1:A20,Sheet2!A1:A20) and changed the format to white text. It did not work either and i'm supposing it has something to do with it being an array. Any suggestions?