Thanks David.
Will try to incorporate this into the macro.

Cheers
Ravi

On 17 Dec 2017 7:20 am, "who" <david.lanm...@gmail.com> wrote:

> Might try this too. Thanks, David
>
> Sub CopyPasteAll()
>     Cells.Select
>     Selection.Copy
>     Selection.PasteSpecial Paste:=xlPasteValues
>     ActiveSheet.Paste
>     Application.CutCopyMode = False
>     ActiveCell.Select
> End Sub
>
> On Friday, December 15, 2017 at 10:14:17 PM UTC-8, Ravi K wrote:
>>
>> Hi
>>
>> Can someone please explain why this macro does not work
>> I have no formal training in VB or any programming so everything in the
>> macro is bits taken from various posts
>>
>> What I need to do is put 1 or 0 over a range that starts at B8 and ends
>> at the last column  with data at row 44652
>> but if I leave the formula "=IF(AND(RC1>R4C,RC1<R5C),1,0)" in the place
>> the workbook becomes too large and  my i5 laptop hangs so I have to convert
>> the formula into the result value 1 or 0
>>
>> ===========================
>> Sub FillCellsMyRange()
>>
>> ' Change the WorkSheet Name
>> Dim shName As String
>> Dim currentName As String
>> currentName = ActiveSheet.Name
>> shName = "MINUTES"
>> If currentName <> shName Then
>> ThisWorkbook.Sheets(currentName).Name = shName
>> End If
>>
>> Dim LastCol As Long
>>     With ActiveSheet.UsedRange
>>         LastCol = .Columns(.Columns.Count).Column
>>     End With
>> Dim LastRow As Long, Rng1 As Long
>> LastRow = Cells.Find(What:="*", After:=Range("A1"),
>> SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
>>
>> 'Set Rng1 = Sheets("MINUTES").Range("B8:" & LastCol &  "44652")
>> 'ActiveWorkbook.Names.Add Name:="MyRange", RefersTo:=Rng1
>>
>>
>>     ' Turn off screen updating to improve performance
>>     Application.ScreenUpdating = False
>>     On Error Resume Next
>>
>>
>>     ' Look in column B
>>     With Sheets("MINUTES").Range("B8:" & LastCol & LastRow)
>>         ' For blank cells, set them to equal the cell above
>>         .SpecialCells(xlCellTypeBlanks).Formula =
>> "=IF(AND(RC1>R4C,RC1<R5C),1,0)"
>>         'Convert the formula to a value
>>         .Value = .Value
>>     End With
>>     Err.Clear
>>     Application.ScreenUpdating = True
>> End Sub
>> =================================
>>
>> again, nothing above is original work, it is all copy & paste of what
>> looked like useful bits from various answers on various groups
>>
>> Thanks again
>>
>> Ravi
>>
>>
>> --
> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
> https://www.facebook.com/discussexcel
>
> FORUM RULES
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
> 2) Don't post a question in the thread of another member.
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
> 4) Acknowledge the responses you receive, good or bad.
> 5) Jobs posting is not allowed.
> 6) Sharing copyrighted material and their links is not allowed.
>
> NOTE : Don't ever post confidential data in a workbook. Forum owners and
> members are not responsible for any loss.
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "MS EXCEL AND VBA MACROS" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/excel-macros/Su5gKtzlr4U/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> excel-macros+unsubscr...@googlegroups.com.
> To post to this group, send email to excel-macros@googlegroups.com.
> Visit this group at https://groups.google.com/group/excel-macros.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at https://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.

Reply via email to