Insert cell if...
Closed
most
-
Jan 11, 2010 at 04:14 AM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Jan 11, 2010 at 09:36 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Jan 11, 2010 at 09:36 PM
Related:
- Insert cell if...
- Insert check mark in word - Guide
- How to insert photo in word for resume - Guide
- Insert draft watermark in word on all pages - Guide
- Insert key on laptop - Guide
- Insert gif in excel - Guide
1 response
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Jan 11, 2010 at 09:36 PM
Jan 11, 2010 at 09:36 PM
not clear to me. do you mean that there are data in coumns A,B,C,D,E like that and that if in a particular row A and B do not macthc in sert a cell betyween existing B and C.
suppose your data is iike this
1 1 a q
2 2 s w
3 4 d e
4 5 f r
now after running the macro given below the data will be like this
1 1 a q
2 2 s w
3 4 d e
4 5 f r
IS THIS DO YOU WANT . That is the data will be shifted to the right
If this is so try this macro (if this is not what you want give someclear examples
suppose your data is iike this
1 1 a q
2 2 s w
3 4 d e
4 5 f r
now after running the macro given below the data will be like this
1 1 a q
2 2 s w
3 4 d e
4 5 f r
IS THIS DO YOU WANT . That is the data will be shifted to the right
If this is so try this macro (if this is not what you want give someclear examples
Sub test() Dim r As Range, c As Range Set r = Range(Range("A1"), Range("A1").End(xlDown)) For Each c In r If c <> c.Offset(0, 1) Then c.Offset(0, 2).Insert shift:=xlShiftToRight End If Next c End Sub