ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Cell insertion if values not matching (https://www.excelbanter.com/excel-worksheet-functions/186589-cell-insertion-if-values-not-matching.html)

Susan

Cell insertion if values not matching
 
Thanks in advance for your help!

I have created a spreadsheet to inventory equipment that have GPS units -

I need help in working through some formatting or Macro, ???

I have placed my master equipment listing in Row B
The exported GPS listing Equipment number in Row C
If they match - Row A has conditional formatting to indicate color Green &
'Verified'

What I need is if they do not match -
If row C row B, insert blank cells in row on columns C,D, & E and shift
cells down to continue the verification process thru the entire 400 piece
listing.

--
Thanks!
Susan

ryguy7272

Cell insertion if values not matching
 
It seems like you are talking about rows and columns as if they are the same
thing (but of course they are not). Try to run this function and see if it
gives you what you want:
Sub InsertAfterTextChange()
Do Until ActiveCell = Empty And ActiveCell.Offset(1) = Empty
If ActiveCell < ActiveCell.Offset(1) And ActiveCell < Empty And
ActiveCell.Offset(1) < Empty Then
ActiveCell.Offset(1).EntireRow.Insert
ActiveCell.Offset(2).Select
Else
ActiveCell.Offset(1).Select
End If
Loop
End Sub

Make sure you have a backup of your data in case the code does not do what
you want. Finally, make sure your data is sorted in order (ascending or
descending) in Column A.

Regards,
Ryan---

--
RyGuy


"Susan" wrote:

Thanks in advance for your help!

I have created a spreadsheet to inventory equipment that have GPS units -

I need help in working through some formatting or Macro, ???

I have placed my master equipment listing in Row B
The exported GPS listing Equipment number in Row C
If they match - Row A has conditional formatting to indicate color Green &
'Verified'

What I need is if they do not match -
If row C row B, insert blank cells in row on columns C,D, & E and shift
cells down to continue the verification process thru the entire 400 piece
listing.

--
Thanks!
Susan


Susan

Cell insertion if values not matching
 
My mistake, I should have written coloumn A, B,C etc.

I'm new at this, so forgive me if I ask what I should already know.

How do I establish the active cell and the active cell offset?
What in this formula should I be changing.
Here is what I need.
IE: If C2 = B2, No Action . . . If C2 < B2, insert cells in C2:I2 (not an
entire row)
Continued thru row 414.

Susan


--
Thanks!
Susan


"ryguy7272" wrote:

It seems like you are talking about rows and columns as if they are the same
thing (but of course they are not). Try to run this function and see if it
gives you what you want:
Sub InsertAfterTextChange()
Do Until ActiveCell = Empty And ActiveCell.Offset(1) = Empty
If ActiveCell < ActiveCell.Offset(1) And ActiveCell < Empty And
ActiveCell.Offset(1) < Empty Then
ActiveCell.Offset(1).EntireRow.Insert
ActiveCell.Offset(2).Select
Else
ActiveCell.Offset(1).Select
End If
Loop
End Sub

Make sure you have a backup of your data in case the code does not do what
you want. Finally, make sure your data is sorted in order (ascending or
descending) in Column A.

Regards,
Ryan---

--
RyGuy


"Susan" wrote:

Thanks in advance for your help!

I have created a spreadsheet to inventory equipment that have GPS units -

I need help in working through some formatting or Macro, ???

I have placed my master equipment listing in Row B
The exported GPS listing Equipment number in Row C
If they match - Row A has conditional formatting to indicate color Green &
'Verified'

What I need is if they do not match -
If row C row B, insert blank cells in row on columns C,D, & E and shift
cells down to continue the verification process thru the entire 400 piece
listing.

--
Thanks!
Susan



All times are GMT +1. The time now is 04:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com