Oberon70
Board Regular
- Joined
- Jan 21, 2022
- Messages
- 160
- Office Version
- 365
- Platform
- Windows
Hi,
I am wanting to write a VBA code that inserts a blank row when the conditions of the below formula are false.
=AND($G2=$A2,$H2=$B2)
What I am wanting to do is compare (File Reference in Column A against File Ref in Column F) and (Cost in Column B against Cost in Column G). If the results is false then I would like to insert a partial blank Row only the area Column A and Be.
Example of data not compared.
Example of what I am looking for the results to be.
Sorry, at work, so I had to pate the sheet in due to security.
I am wanting to write a VBA code that inserts a blank row when the conditions of the below formula are false.
=AND($G2=$A2,$H2=$B2)
What I am wanting to do is compare (File Reference in Column A against File Ref in Column F) and (Cost in Column B against Cost in Column G). If the results is false then I would like to insert a partial blank Row only the area Column A and Be.
Example of data not compared.
File Ref | Cost | File Ref | Cost | ||
BE4564 | 4.13 | NB9999 | 20 | ||
BE4564 | 4.13 | NB9999 | 20 | ||
AC1234 | 13.75 | NB9999 | 20 | ||
EV3432 | 5.5 | NB9999 | 20 | ||
EV3432 | 5.5 | NB9999 | 20 | ||
HF2343 | 1.38 | BE4564 | 4.13 | ||
HF2343 | 1.38 | BE4564 | 4.13 | ||
AK2434 | 1.38 | BE4564 | 30 | ||
AK2434 | 1.38 | BE4564 | 30 | ||
AK2434 | 1.38 | AC1234 | 13.75 | ||
AK2434 | 1.38 | AC1234 | 100 | ||
UI9833 | 6.88 | EV3432 | 5.5 | ||
OP3435 | 2.75 | EV3432 | 5.5 | ||
OP3435 | 2.75 | EV3432 | 40 | ||
EV3432 | 40 | ||||
HF2343 | 1.38 | ||||
HF2343 | 1.38 | ||||
HF2343 | 10 | ||||
HF2343 | 10 | ||||
AK2434 | 1.38 | ||||
AK2434 | 1.38 | ||||
AK2434 | 1.38 | ||||
AK2434 | 1.38 | ||||
AK2434 | 10 | ||||
AK2434 | 10 | ||||
AK2434 | 10 | ||||
AK2434 | 10 | ||||
UI9833 | 6.88 | ||||
UI9833 | 50 | ||||
OP3435 | 2.75 |
Example of what I am looking for the results to be.
File Ref | Cost | File Ref | Cost | ||
NB9999 | 20 | ||||
NB9999 | 20 | ||||
NB9999 | 20 | ||||
NB9999 | 20 | ||||
NB9999 | 20 | ||||
BE4564 | 4.13 | BE4564 | 4.13 | ||
BE4564 | 4.13 | BE4564 | 4.13 | ||
AC1234 | 13.75 | BE4564 | 30 | ||
BE4564 | 30 | ||||
AC1234 | 13.75 | ||||
AC1234 | 100 | ||||
EV3432 | 5.5 | EV3432 | 5.5 | ||
EV3432 | 5.5 | EV3432 | 5.5 | ||
EV3432 | 40 | ||||
EV3432 | 40 | ||||
HF2343 | 1.38 | HF2343 | 1.38 | ||
HF2343 | 1.38 | HF2343 | 1.38 | ||
HF2343 | 10 | ||||
HF2343 | 10 | ||||
AK2434 | 1.38 | AK2434 | 1.38 | ||
AK2434 | 1.38 | AK2434 | 1.38 | ||
AK2434 | 1.38 | AK2434 | 1.38 | ||
AK2434 | 1.38 | AK2434 | 1.38 | ||
UI9833 | 6.88 | AK2434 | 10 | ||
OP3435 | 2.75 | AK2434 | 10 | ||
OP3435 | 2.75 | AK2434 | 10 | ||
AK2434 | 10 | ||||
UI9833 | 6.88 | UI9833 | 6.88 | ||
OP3435 | 2.75 | UI9833 | 50 | ||
OP3435 | 2.75 | OP3435 | 2.75 |
Sorry, at work, so I had to pate the sheet in due to security.