Compare the last value from two different columns

sofas

Active Member
Joined
Sep 11, 2022
Messages
469
Office Version
  1. 2019
Platform
  1. Windows
Hello, I have two Excel sheets. In each sheet there is a column for the date. I want to compare the last date in column ("C") sheet1. If it is less than or equal to the last date in sheet2 column ("C"), nothing will happen. If it is greater, it is copied to sheet1 under Last date in column ("C") and copy it 5 times in a row
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
this will compare the last cells of each column. But, you will need VBA to insert the data into new information:
=LOOKUP(DATE(2099,12,31),Sheet1!C:C) =LOOKUP(DATE(2099,12,31),Sheet2!C:C)
 
Upvote 0
Capture.PNG


This is an example of what is required. When checking that the last date in sheet 1 is greater than the last date in sheet 2, the last date in the column is copied to sheet 2_ 5 times, but in case it is equal or less, nothing is done
 
Upvote 0

Forum statistics

Threads
1,215,137
Messages
6,123,254
Members
449,093
Latest member
Vincent Khandagale

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top