Trying to figure out an efficient to use way to enter and display data
that at present is just entered as text...
Situation:
Assign from one to as many as 10 or so awardees to a given scholarship
fund along with award amount of each, keeping a total award in another cell.
Present Practice:
Just string them together in almost free-form text of student, $award, SYY/FYY (awardyear)
Fred Flintstone $200 18/19, Barney Rubble $150, 18/19, ...
It would be easy to just add sets of three columns but that's quickly up
to 30 columns or so, most of which are going to be empty because there's
only a handful of funds large enough for the many multiple awards so it
gets terribly bulky and there are already 50-some columns in the
workbook as is by time include the financial data from which to compute
the award values, etc., etc., ...
Just looking for organizational ideas here...if there were way to insert table into a cell which could be easily queried would be nice like a
comment sorta' except again that requires parsing text and relying on
data input following a format rigidly that can't get the folks to
do--been through that exercise already on another issue...
Trying to figure out an efficient to use way to enter and display data...
that at present is just entered as text...
Situation:
Assign from one to as many as 10 or so awardees to a given scholarship
fund along with award amount of each, keeping a total award in another
cell.
Present Practice:
Just string them together in almost free-form text of student, $award, SYY/FYY (awardyear)
Fred Flintstone $200 18/19, Barney Rubble $150, 18/19, ...
It would be easy to just add sets of three columns but that's quickly up
to 30 columns or so, most of which are going to be empty because there's
only a handful of funds large enough for the many multiple awards so it
gets terribly bulky and there are already 50-some columns in the
workbook as is by time include the financial data from which to compute
the award values, etc., etc., ...
Hi,
Am Sat, 5 Sep 2020 08:54:54 -0500 schrieb dpb:
Just looking for organizational ideas here...if there were way to insert
table into a cell which could be easily queried would be nice like a
comment sorta' except again that requires parsing text and relying on
data input following a format rigidly that can't get the folks to
do--been through that exercise already on another issue...
I hope I understood your problem correctly.
Have a look:
https://1drv.ms/x/s!AqMiGBK2qniTge8JOESumXfAGc0Jmg?e=XUK2eH
On 9/5/2020 9:43 AM, Claus Busch wrote:...
Hi,...
Am Sat, 5 Sep 2020 08:54:54 -0500 schrieb dpb:
Thanks, Claus...Just looking for organizational ideas here...if there were way to insert >>> table into a cell which could be easily queried would be nice like a
comment sorta' except again that requires parsing text and relying on
data input following a format rigidly that can't get the folks to
do--been through that exercise already on another issue...
I hope I understood your problem correctly.
Have a look:
https://1drv.ms/x/s!AqMiGBK2qniTge8JOESumXfAGc0Jmg?e=XUK2eH
Yeah, you understand the issue correctly; unfortunately that solution is
the one outlined above that to work requires religious adherence to the format on data entry which I simply haven't been able to train them to
stick to... :(
The other is one still has to then parse the string to get the award $$ amount to calculate the running sum as award to compare to the total available from a given fund.
Agreed, one can do similar text conversion to get the values but still
has the issue re: the formatting between entries to make it work reliably.
In doing searching for ideas online I discovered the Alt+Enter trick to insert newline in cell. Really slick for presentation; unfortunately it requires a delimiter as well to then parse the data as well...too bad MS hasn't implemented the "table in a cell" idea...like comment sorta,
except be able to define the data content and retrieve field
content...or an array in a cell instead of only an array of cells.
Oh! Another stray thought/idea..
Is there a way to make a click on cell focus take one to another
location for data entry that could be the start point for the award data
for the fund? Ideal would be to be able to direct to next available
cell for the fund, but just the start would be workable...
Hi again,
Am Mon, 7 Sep 2020 10:39:13 -0500 schrieb dpb:
In doing searching for ideas online I discovered the Alt+Enter trick to
insert newline in cell. Really slick for presentation; unfortunately it
requires a delimiter as well to then parse the data as well...too bad MS
hasn't implemented the "table in a cell" idea...like comment sorta,
except be able to define the data content and retrieve field
content...or an array in a cell instead of only an array of cells.
Oh! Another stray thought/idea..
Is there a way to make a click on cell focus take one to another
location for data entry that could be the start point for the award data
for the fund? Ideal would be to be able to direct to next available
cell for the fund, but just the start would be workable...
try it with RegExp
Your data in A1. Then the parts of the string will be listed to B:D
Sub SplitData()
Dim re As Object
Dim ptrn, Match, Matches
Dim strText As String
Dim i As Integer, n As Integer
Dim varData() As Variant
Set re = CreateObject("vbscript.regexp")
strText = Range("A1")
ptrn = "\w+"
re.Pattern = ptrn
re.IgnoreCase = False
re.Global = True
Set Matches = re.Execute(strText)
n = 1
For i = 0 To Matches.Count - 5 Step 5
Cells(n, "B") = Matches(i) & " " & Matches(i + 1)
Cells(n, "C") = CInt(Matches(i + 2))
Cells(n, "D") = Matches(i + 3) & "/" & Matches(i + 4)
n = n + 1
Next
End Sub
Hi again,
Am Mon, 7 Sep 2020 10:39:13 -0500 schrieb dpb:
In doing searching for ideas online I discovered the Alt+Enter trick to
insert newline in cell. Really slick for presentation; unfortunately it
requires a delimiter as well to then parse the data as well...too bad MS
hasn't implemented the "table in a cell" idea...like comment sorta,
except be able to define the data content and retrieve field
content...or an array in a cell instead of only an array of cells.
Oh! Another stray thought/idea..
Is there a way to make a click on cell focus take one to another
location for data entry that could be the start point for the award data
for the fund? Ideal would be to be able to direct to next available
cell for the fund, but just the start would be workable...
try it with RegExp
Your data in A1. Then the parts of the string will be listed to B:D
Sub SplitData()
Dim re As Object
Dim ptrn, Match, Matches
Dim strText As String
Dim i As Integer, n As Integer
Dim varData() As Variant
Set re = CreateObject("vbscript.regexp")
strText = Range("A1")
ptrn = "\w+"
re.Pattern = ptrn
re.IgnoreCase = False
re.Global = True
Set Matches = re.Execute(strText)
n = 1
For i = 0 To Matches.Count - 5 Step 5
Cells(n, "B") = Matches(i) & " " & Matches(i + 1)
Cells(n, "C") = CInt(Matches(i + 2))
Cells(n, "D") = Matches(i + 3) & "/" & Matches(i + 4)
n = n + 1
Next
End Sub
Regards
Claus B.
What if went with three columns only (well maybe four, add the
institution SID would be another I see useful, potentially) but don't
really care so much about splitting the string data; if just see it in
the once cell that may be enough...altho guess that would mean adjusting
row height sufficiently.
Anyway, what if don't spread and have
A:D as SID, StudName, $Award, DateCode
What would =SUM($Award) values look like -- something like
Sub SumSplitData()
Dim re As Object
Dim ptrn, Match, Matches
Dim strText As String
Dim i As Integer, n As Integer
Dim varData() As Variant
Set re = CreateObject("vbscript.regexp")
strText = Range("C1")
ptrn = "\w+"
re.Pattern = ptrn
re.IgnoreCase = False
re.Global = True
Set Matches = re.Execute(strText)
totalAward=0
For i = 1 To Matches.Count
totalAware=totalAward+CDbl(Matches(i)
Next
End Sub
? I don't know enough VBA w/o really digging to know how to convert to function that could use in cell to reference the input cell, though.
Something like that could really be the workaround for now I think...the existing data is from last year and we're starting a new year billing
cycle since we operate on calendar instead of academic year, so what few awards are there that carry forward (as a 2-year school, there's only
the freshman that are back) and I've already got those identified so for
the most part we're entering new data, and I can let the past year's
data go.
I was just trying to avoid keeping on doing the same thing this year in redesigning the input form to segregate the subfields.
A3:C3 display
A3 B3 C3
"123.34 "123.34 432.10" #NAME?
432.10"
How to write a function that can be entered in B3:B221 that returns sum
of the split values in A3:A221 respectively? That'd be the trick...
Hi,...
Am Mon, 7 Sep 2020 14:51:56 -0500 schrieb dpb:
A3:C3 display
A3 B3 C3
"123.34 "123.34 432.10" #NAME?
432.10"
to split the data of A3 to B3:C3 try:
Sub SplitData()
Dim varData As Variant
varData = Split(Range("A3"), Chr(10))
Range("B3").Resize(, UBound(varData) + 1) = varData
End Sub
Hi,
Am Mon, 7 Sep 2020 13:02:59 -0500 schrieb dpb:
What if went with three columns only (well maybe four, add the
institution SID would be another I see useful, potentially) but don't
really care so much about splitting the string data; if just see it in
the once cell that may be enough...altho guess that would mean adjusting
row height sufficiently.
Anyway, what if don't spread and have
A:D as SID, StudName, $Award, DateCode
What would =SUM($Award) values look like -- something like
Sub SumSplitData()
Dim re As Object
Dim ptrn, Match, Matches
Dim strText As String
Dim i As Integer, n As Integer
Dim varData() As Variant
Set re = CreateObject("vbscript.regexp")
strText = Range("C1")
ptrn = "\w+"
re.Pattern = ptrn
re.IgnoreCase = False
re.Global = True
Set Matches = re.Execute(strText)
totalAward=0
For i = 1 To Matches.Count
totalAware=totalAward+CDbl(Matches(i)
Next
End Sub
? I don't know enough VBA w/o really digging to know how to convert to
function that could use in cell to reference the input cell, though.
Something like that could really be the workaround for now I think...the
existing data is from last year and we're starting a new year billing
cycle since we operate on calendar instead of academic year, so what few
awards are there that carry forward (as a 2-year school, there's only
the freshman that are back) and I've already got those identified so for
the most part we're entering new data, and I can let the past year's
data go.
I was just trying to avoid keeping on doing the same thing this year in
redesigning the input form to segregate the subfields.
have a look:
https://1drv.ms/x/s!AqMiGBK2qniTge8JPuyoOVSMVs3Wlg?e=TuplIq
Is that what you want?
Function SplitData(myRng As Range)
'SplitData = Split(myRng, Chr(10))
SplitData = Join(Split(myRng, Chr(10)), " ")
End Function
Hi again,
Am Mon, 7 Sep 2020 23:14:58 +0200 schrieb Claus Busch:
Function SplitData(myRng As Range)
'SplitData = Split(myRng, Chr(10))
SplitData = Join(Split(myRng, Chr(10)), " ")
End Function
have a look:
https://1drv.ms/x/s!AqMiGBK2qniTge8JPuyoOVSMVs3Wlg?e=TZSYqm
Regards
Claus B.
I can always revert to the gazillion columns if have to if this turns...
out too klunky this way...think only trying to use it will answer that Q?
I did get the summation function to work, still using regexp(); I'll...
play with SPLIT() going forward.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 60:13:23 |
Calls: | 6,654 |
Calls today: | 6 |
Files: | 12,200 |
Messages: | 5,331,392 |