to replace a value in each cell of the column

P

pol

Dear All,

In an excel have a column with a name 'TRANTYPE' ie in B1 cell in which
contain the value 'I' and 'C'. 'I' for Invoice and 'C' for credit. I want
to replace all the values in a cell as follows
if the value is 'I' it should be replaced with 'Invoice'
if the value is 'C' it should be replaced with 'Credit' in all the cell of
that column.

Please help .

Pol
 
E

Eduardo

Hi,
I don't know if I understand you want to replace the I for Invoice and the C
with the word Credit if yes hit CTRL H , where it says find what enter I and
in replace with enter Invoice and then do it again to change the C if I
misunderstood you please give me an example thanks
If this was helpful please click yes, thanks
 
E

Eduardo

Hi,
I don't know if I understand you want to replace the I for Invoice and the C
with the word Credit if yes hit CTRL H , where it says find what enter I and
in replace with enter Invoice and then do it again to change the C if I
misunderstood you please give me an example thanks
If this was helpful please click yes, thanks
 
J

Jacob Skaria

Select Column>Edit>Replace>
From option>check 'Match Entire cell contents'
Enter your criteria
 
J

Jacob Skaria

Select Column>Edit>Replace>
From option>check 'Match Entire cell contents'
Enter your criteria
 
P

pol

Thanks for the reply. I want to use a macro to find and replace

I -> replace with Invoice
C -> Replaced with Credit

I cannot use menu option edit-> find and replace. I have to use macro to
find I and C in all the cells of the column C
 
P

pol

Thanks for the reply. I want to use a macro to find and replace

I -> replace with Invoice
C -> Replaced with Credit

I cannot use menu option edit-> find and replace. I have to use macro to
find I and C in all the cells of the column C
 
E

Eduardo

Hi Pol,
Sub Replace()
'
' MacroReplace Macro
'

'
Columns("C:C").Select
Range("c1").Activate
Selection.Replace What:="I", Replacement:="Invoice", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub
 
E

Eduardo

Hi Pol,
Sub Replace()
'
' MacroReplace Macro
'

'
Columns("C:C").Select
Range("c1").Activate
Selection.Replace What:="I", Replacement:="Invoice", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top