RE: Output text from numbers
- From: LiAD <LiAD@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 10 Dec 2008 01:16:22 -0800
For j = 2 To Columns.Count - for this line its saying compile error, invalid
outside procedure
I'm afraid VB is past me, so this means nothing for me. I tried doing F5 to
run and it came up with this error.
"LiAD" wrote:
Thanks,.
Unfortunately I cannot get this to run at all. I can't get any output from
it. Do i need to do something special to make this run?
Is VB the only way of doing this or is there a formula that would do this?
Thanks
LD
"Gary''s Student" wrote:
This macro assumes the input table start in A1.
It continues until it finds 3 empties in a column in the table
The macro stores the output in row 4
Sub liad()
' gsnuxx
For j = 2 To Columns.Count
Set r = Range(Cells(1, j), Cells(3, j))
If Application.WorksheetFunction.CountA(r) = 0 Then
Exit Sub
End If
times = Application.WorksheetFunction.Max(r)
If Not IsEmpty(Cells(1, j)) Then simbol = "I"
If Not IsEmpty(Cells(2, j)) Then simbol = "E"
If Not IsEmpty(Cells(3, j)) Then simbol = "W"
If IsEmpty(Cells(4, 1)) Then
n = 1
Else
n = Cells(4, Columns.Count).End(xlToLeft).Column + 1
End If
For k = 1 To times
Cells(4, k + n - 1).Value = simbol
Next
Next
End Sub
--
Gary''s Student - gsnu200819
"LiAD" wrote:
I would like to find a way of getting excel to interpret numbers associated
with letters and output a text string. What I want to do is then use this
text string with a conditional format to provide a horizontal colour
sequence. Example below for how the table is required to output the text
string.
I 2 4
Input E 1 2
W 3
Output desired I I E W W W E E I I I
I
In any one column there will only be one number so excel needs to scan the
left most column first and repeat in a row in separate cells the number of
letters quoted in the table for that input. Then scan the second column and
output the letter x times in the next cell along etc.
Do you know if this is possible with Excel?
- Follow-Ups:
- RE: Output text from numbers
- From: Gary''s Student
- RE: Output text from numbers
- References:
- Output text from numbers
- From: LiAD
- RE: Output text from numbers
- From: Gary''s Student
- RE: Output text from numbers
- From: LiAD
- Output text from numbers
- Prev by Date: Re: Setting a column read figure from table
- Next by Date: RE: How do I Hyperlink to document using filename in cell?
- Previous by thread: RE: Output text from numbers
- Next by thread: RE: Output text from numbers
- Index(es):