Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I was unable to make this loop work the way that I wanted to. TO make
it work I had to add a Goto. I hate these but find them necessary when I get stuck in a loop. I was trying to find the last column in a row that has information in it and then putting my information in the next column. Any thoughts? Thanks, Jay x = 12 Do If Log.Cells(QuoteRow, x).Offset(0, 1) = "" Then Log.Cells(QuoteRow, x).Offset(0, 1) = Dt GoTo E Else x = x + 1 End If Loop Until Log.Cells(QuoteRow, x) = "" E: |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
try
Do Until Cells(QuoteRow, x) = "" If Cells(QuoteRow, x).Offset(0, 1) = "" Then Cells(QuoteRow, x).Offset(0, 1) = Dt GoTo E Else x = x + 1 End If Loop |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Loop not needed:
Sub dural() Dim QuoteRow As Long QuoteRow = 13 n = Cells(QuoteRow, Columns.Count).End(xlToLeft).Column Cells(QuoteRow, n + 1).Value = Cells(QuoteRow, n).Value End Sub -- Gary''s Student - gsnu200819 |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
One way:
Replace your entire code with Log.Cells(QuoteRow, Columns.Count).End(xlToLeft)(1, 2).Value = Dt In article , jlclyde wrote: I was trying to find the last column in a row that has information in it and then putting my information in the next column. Any thoughts? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
do..loop | Excel Discussion (Misc queries) | |||
DO LOOP in VBA | Excel Discussion (Misc queries) | |||
Do Loop | Excel Worksheet Functions | |||
Do Loop | Excel Worksheet Functions | |||
Do Loop | Excel Worksheet Functions |