Tosborn
New Member
- Joined
- May 24, 2016
- Messages
- 44
Hi guys,
I have this code which works as intended but i need to expand it without much idea of where to begin.
the end result needs to look like this:
formula in cell:
="<<" &B1 & ","&B2 & ","&B3 & ","&B4 & ","&B5
actual value:
<<327020,327117,327123,327403,327410
My current code:
which creates the formula:
="<<" &B1 & ","
that is the value:
<<327020,
if I run this as step into, on each run it goes down my list in the B column to give me
<<327020,
then
<<327117,
etc
with my list in column B looking like this:
327020
327117
327123
327403
327410
and the cell in D1 has a value of 5 which is counting how many cells that contain values.
I need this macro to change as the list in column B expands or contracts to have more or less numbers.
I hope this is clear enough. Greatly appreciate any assistance at all.
Many thanks!
Tim
I have this code which works as intended but i need to expand it without much idea of where to begin.
the end result needs to look like this:
formula in cell:
="<<" &B1 & ","&B2 & ","&B3 & ","&B4 & ","&B5
actual value:
<<327020,327117,327123,327403,327410
My current code:
VBA Code:
Sub JnlLookup()
'to create a large journal lookup from a list of journals
Dim i As Integer
For i = 1 To Range("D1")
Cells(4, 4).Formula = "=""<<"" &B" & i & " & "","" "
Next i
End Sub
="<<" &B1 & ","
that is the value:
<<327020,
if I run this as step into, on each run it goes down my list in the B column to give me
<<327020,
then
<<327117,
etc
with my list in column B looking like this:
327020
327117
327123
327403
327410
and the cell in D1 has a value of 5 which is counting how many cells that contain values.
I need this macro to change as the list in column B expands or contracts to have more or less numbers.
I hope this is clear enough. Greatly appreciate any assistance at all.
Many thanks!
Tim