# Posts by mohammedismail

Re: IF text in a cell meets a condition then copy and paste the entire cell in a new

Try the below Formula in B2 and Drag down.

[BFN]=IF(IF(OR(IFERROR(SEARCH(0,A2,1),0)>0,IFERROR(SEARCH(4,A2,1),0)>0),A2,"")="","",LEFT(IF(OR(IFERROR(SEARCH(0,A2,1),0)>0,IFERROR(SEARCH(4,A2,1),0)>0),A2,""),SEARCH(".",A2,1))&"Com")[/BFN]

And the below in C2 and Drag down !

[BFN]=IF(IF(AND(IFERROR(SEARCH(0,A2,1),0)=0,IFERROR(SEARCH(4,A2,1),0)=0),A2,"")="","",LEFT(IF(AND(IFERROR(SEARCH(0,A2,1),0)=0,IFERROR(SEARCH(4,A2,1),0)=0),A2,""),SEARCH(".",A2,1))&"Com")[/BFN]

Re: Excel uniqe values needed

Select the Data, Goto DATA Tab in Excel then "Remove Duplicates", in the dialogue box that appears untick all columns except SET Column. That should work for you.

Re: Update Report date but will not auto-update after

It is not possible without VBA because the formula needs to be pasted as values for it to not get updated again!

Re: Variable decimal places using VBA

Sorry please see below !

Code
``````Sub M()
For i = 1 To 100 ' Change as per requirement
If InStr(Range("A" & i), ".") = 0 Then ' CHeck in Column A for Decimal Value
intdec = 0
Else
intdec = Len(Range("A" & i)) - InStr(Range("A" & i), ".")
End If
Range("G" & i) = Round(Range("C" & i), intdec) ' Updates Column G with the Value in Column C..Change as per requirement
Next
End Sub``````

Re: Variable decimal places using VBA

Please try the below, let me know if it helps !

Code
``````Sub M()For i = 1 To 100 ' Change as per requirement
Range("B" & i) = Format(Range("A" & i), "." & String(Len(Range("A" & i)) - InStr(Range("A" & i), "."), "0")) ' Column B is Output and Column A is input change as pere requirement
Next
End Sub``````

Re: Macro to find a value in excel and paste the nth value from there on

Try this !

This just displays the Msgbox, can be edited to update a particular column.

Re: Display A,B,C and/or D based on rows in front

Cheers !

Re: Getting a total from one column if another colmn contains a date

Try this !

[BFN]=SUMIFS(A:A,B:B,"<>"&"")[/BFN]

Re: Display A,B,C and/or D based on rows in front

From what I have understood, I believe this is what you are looking for ! Please respond if not !

[BFN]=CONCATENATE(IF(A2="Yes","A",""),IF(B2="Yes","B",""),IF(C2="Yes","C",""),IF(D2="Yes","D",""))[/BFN]

Re: MAX IF in VBA

Try this !

Code
``````Sub find_last_segment()
For Each x In Selection
x.Offset(0, 1).FormulaArray = ("=MAX(IF('Phone Raw Data'!\$G:\$G="& x & ",'Phone Raw Data'!\$K:\$K))")
Next x
End Sub``````

Re: MAX IF in VBA

Does this help ?

Code
``````Sub M()
Range("B1").FormulaArray = " =MAX(IF('Phone Raw Data'!\$G:\$G=[@[Call_ID]],'Phone Raw Data'!\$K:\$K))"
End Sub``````

Re: move excel sheet from one document and ovewrite on another document

It worked fine with the Sample files which you provided ! Can you please tell me the exact File names of your Source and Destination so that I can update the Macro ?

Re: Copy specific cells to the next blank row in another workbook

Let me know if the below helps !

Re: type missmatch

Change to this ?

Code
``Set ws = wbNew.Worksheets(1)``

Re: move excel sheet from one document and ovewrite on another document

Try this ! Run this from your Master Workbook and Rename the Master and Source workbook names.

Re: move excel sheet from one document and ovewrite on another document

I have edited my code which says where you need to change the Name of the Destination workbook. Just make the changes there and Put the code in the Source workbook and Run the code !

Re: vba to send email

Try this ! Re: Code to reconstruct a set of data (text)

Cheers !

Re: Searching for multiple text in a cell , If found print the text Name in VBA

Cheers !