Copy Last Previous Cells Coloured value

annadinesh

Board Regular
Joined
Mar 1, 2017
Messages
105
Please help me for the following

1ST FS2ND FS3RD FSLAST PMS
04.03.201923.06.202003.01.2021
26.02.200529.07.200515.10.2005
30.07.201806.05.201904.01.2021

I have 4 colomns E to H in which i want in cell of coloumn H the value should shows the value like this

if value of a cell in coloumn E is in red colour then the value of cell H will be value of cell E, if the value of E & F is Red then the Value of cell of coloumn H should be the value of F, if the value of E F & G are red then the value of H should be value of G

Hope you understood my question


Regards


Dinesh Saha
 

Attachments

  • copy coloured text.jpg
    copy coloured text.jpg
    24.8 KB · Views: 5
Last edited by a moderator:

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Are these cells being colored by Conditional Formatting, or are they being colored manually?

If they are being colored by Conditional Formatting, we should be able to use the same logic for our formula in column H as we do for the logic of the Conditional Formatting (so please let us know what the Conditional Formatting logic is).

If the cells are being colored manually, then we will have to use VBA, and native Excel functions can only look at the value in a cell, not the formatting.
If you would like to pursue a VBA solution, let us know and we can come up with the VBA code that you would have to run in order to do this.
 
Upvote 0
Are these cells being colored by Conditional Formatting, or are they being colored manually?

If they are being colored by Conditional Formatting, we should be able to use the same logic for our formula in column H as we do for the logic of the Conditional Formatting (so please let us know what the Conditional Formatting logic is).

If the cells are being colored manually, then we will have to use VBA, and native Excel functions can only look at the value in a cell, not the formatting.
If you would like to pursue a VBA solution, let us know and we can come up with the VBA code that you would have to run in order to do this.
The Colour of the Cells automatically changed to red from black if the existing date modified (Mannually) in Coloumn E to G by below mention code


If Target.Column = 7 Then 'change column as suited (1=A)
If oldDate <> Target And Target <> "" Then
Target.Font.Color = -16776961
End If
End If


if the date is not manually modified then the date colour stays BLACK, thatswhy i need help
 
Upvote 0
The Colour of the Cells automatically changed to red from black if the existing date modified (Mannually) in Coloumn E to G by below mention code


If Target.Column = 7 Then 'change column as suited (1=A)
If oldDate <> Target And Target <> "" Then
Target.Font.Color = -16776961
End If
End If


if the date is not manually modified then the date colour stays BLACK, thatswhy i need help
It looks like that code will only update the color of column G, not columns E or F.
Do you have other code that updates those columns?
Can you post the ENTIRE VBA procedure, and not just a snippet of it, so we can get a full understanding of how this is all working?
 
Upvote 0
It looks like that code will only update the color of column G, not columns E or F.
Do you have other code that updates those columns?
Can you post the ENTIRE VBA procedure, and not just a snippet of it, so we can get a full understanding of how this is all working?
If Selection.Cells.Count > 1 Then Exit Sub
If Target.Column = 5 Then 'change column as suited (1=A)
If oldDate <> Target And Target <> "" Then
Target.Font.Color = -16776961
End If
End If
If Target.Column = 6 Then 'change column as suited (1=A)
If oldDate <> Target And Target <> "" Then
Target.Font.Color = -16776961
End If
End If
If Target.Column = 7 Then 'change column as suited (1=A)
If oldDate <> Target And Target <> "" Then
Target.Font.Color = -16776961
Target.Offset(0, 1).Font.Color = -16776961
End If
End If
If Target.Column = 8 Then 'change column as suited (1=A)
If oldDate <> Target And Target <> "" Then
Target.Font.Color = -16776961
End If
End If
 
Upvote 0
Please post the ENTIRE code, including the procedure name line and "End Sub" lines.
I need to see what type of event procedure you are running.

Also, it appears that you are using a variable name "oldDate", but I do not see that being set anywhere in the code you posted.
We really need to understand how all of this is currently working in order to come up with a response to help you.
Remember, we do not have access to your file, nor do we know any of the history behind. All that we know about this is what you share with us here.
So the more detail you share, the better.
 
Upvote 0

Forum statistics

Threads
1,214,967
Messages
6,122,503
Members
449,090
Latest member
RandomExceller01

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