Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The following code is only part of larger posting process. I require
assistance for this posting to be done only if DG77 is NOT €œ€ i.e. there must be value, zero is not a value. Additional info, the formula in DG77 is =IF($DF$8=1,$DF$3,€€) DF3 has a positive number all the time. Set CopyRng = _ Sheets("Sheet2").Range("DG77", "DH77") Set DestRng = _ Sheets("Sheet1").Cells(65536, "F").End(xlUp).Offset(1, 0) i = 0 For Each cell In CopyRng DestRng.Offset(0, i).Value = cell i = i + 2 Next Similar postings (without conditions) take place before and after the process above. Thank you. -- Robert |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
what about:
If Sheets("Sheet2").Range("DF8").Value = 1 Then Set CopyRng = _ Sheets("Sheet2").Range("DG77", "DH77") Set DestRng = _ Sheets("Sheet1").Cells(65536, "F").End(xlUp).Offset(1, 0) i = 0 For Each cell In CopyRng DestRng.Offset(0, i).Value = cell i = i + 2 Next End If Hope this helps Rowan Robert wrote: The following code is only part of larger posting process. I require assistance for this posting to be done only if DG77 is NOT €œ€ i.e. there must be value, zero is not a value. Additional info, the formula in DG77 is =IF($DF$8=1,$DF$3,€€) DF3 has a positive number all the time. Set CopyRng = _ Sheets("Sheet2").Range("DG77", "DH77") Set DestRng = _ Sheets("Sheet1").Cells(65536, "F").End(xlUp).Offset(1, 0) i = 0 For Each cell In CopyRng DestRng.Offset(0, i).Value = cell i = i + 2 Next Similar postings (without conditions) take place before and after the process above. Thank you. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
will this work for you?
If Range("DG77") = "" Or Range("dg77") = 0 Then ' do nothing Else 'do something your code here End If -- Gary "Robert" wrote in message ... The following code is only part of larger posting process. I require assistance for this posting to be done only if DG77 is NOT "" i.e. there must be value, zero is not a value. Additional info, the formula in DG77 is =IF($DF$8=1,$DF$3,"") DF3 has a positive number all the time. Set CopyRng = _ Sheets("Sheet2").Range("DG77", "DH77") Set DestRng = _ Sheets("Sheet1").Cells(65536, "F").End(xlUp).Offset(1, 0) i = 0 For Each cell In CopyRng DestRng.Offset(0, i).Value = cell i = i + 2 Next Similar postings (without conditions) take place before and after the process above. Thank you. -- Robert |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you Rowan.
-- Robert |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You're welcome!
Robert wrote: Thank you Rowan. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you Gary, I tried yours after Rowans.
Special thanks to Rowan and Gary for being so fast. -- Robert |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
you're welcome, as long as it worked<g
hopefully it worked out ok. -- Gary "Robert" wrote in message ... Thank you Gary, I tried yours after Rowans. Special thanks to Rowan and Gary for being so fast. -- Robert |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Gary, of course it works, Rowans as well. I do not know any VBA and had to
shift the "End If" by trial and error. -- Robert |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
posting | Excel Discussion (Misc queries) | |||
[OT] posting | Excel Worksheet Functions | |||
(1) VARIABLE IN POSTING CODE (2) LOOPING | Excel Programming | |||
the owner of posting should be able to delete the posting | Excel Discussion (Misc queries) | |||
Posting in the next row | Excel Worksheet Functions |