need True =True data

sksanjeev786

Well-known Member
Joined
Aug 5, 2020
Messages
1,010
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi Team

Below is my data and i need True data for both A 4 having Color and E4 having arrow symbol..so I4 i need true data

Book1
ABCDEFGHIJK
3-0.60.81.7-0.60.81.7TRUETRUETRUE
4-7.6-7.2-2.9-7.6 q-7.2 q-2.9FALSEFALSETRUE
5-6-3.9-3.6-6-3.9-3.6TRUETRUETRUE
63.63.94.63.6 r3.9 r4.6 pFALSEFALSEFALSE
7-5.9-4.9-3.4-5.9-4.9-3.4TRUETRUETRUE
8-5.5-4.9-1.7-5.5-4.9-1.7TRUETRUETRUE
Sheet1
Cell Formulas
RangeFormula
I3:K8I3=A3=E3
Cells with Conditional Formatting
CellConditionCell FormatStop If True
I3:L8Cell Valuecontains "f"textNO
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
I am not sure if XL2BB is losing something in the translation.
You mention seeing a symbol in column E but all that is coming through is that E4 & E6 have a q and r at the end and are being seen as Text.

Your profile has 2 version on it. If you are using MS 365 and E4 and E6 are text at your end then would something like this work ?

Book1
ABCDEFGHIJK
1
2
3-0.60.81.7-0.60.81.7TRUETRUETRUE
4-7.6-7.2-2.9-7.6 q-7.2 q-2.9TRUETRUETRUE
5-6-3.9-3.6-6-3.9-3.6TRUETRUETRUE
63.63.94.63.6 r3.9 r4.6 pTRUETRUETRUE
7-5.9-4.9-3.4-5.9-4.9-3.4TRUETRUETRUE
8-5.5-4.9-1.7-5.5-4.9-1.7TRUETRUETRUE
Sheet1
Cell Formulas
RangeFormula
I3:K8I3=A3=VALUE(TEXTBEFORE(E3," ",,,1))
 
Upvote 0
I am not sure if XL2BB is losing something in the translation.
You mention seeing a symbol in column E but all that is coming through is that E4 & E6 have a q and r at the end and are being seen as Text.

Your profile has 2 version on it. If you are using MS 365 and E4 and E6 are text at your end then would something like this work ?

Book1
ABCDEFGHIJK
1
2
3-0.60.81.7-0.60.81.7TRUETRUETRUE
4-7.6-7.2-2.9-7.6 q-7.2 q-2.9TRUETRUETRUE
5-6-3.9-3.6-6-3.9-3.6TRUETRUETRUE
63.63.94.63.6 r3.9 r4.6 pTRUETRUETRUE
7-5.9-4.9-3.4-5.9-4.9-3.4TRUETRUETRUE
8-5.5-4.9-1.7-5.5-4.9-1.7TRUETRUETRUE
Sheet1
Cell Formulas
RangeFormula
I3:K8I3=A3=VALUE(TEXTBEFORE(E3," ",,,1))

Thank you so much Alex,

But can we have data checked including Color on column A and letter column E (Basically it is a symbol Wingding font)
This is the interior color of cell color in column A


18​
Red
45​
Light Green
12​
Dark Green
 
Upvote 0
To check colour you are going to need VBA.
Is that what you had in mind ?

If it is I am about to log off and can't do it tonight, if that is what you want and you don't get someone to help you before tomorrow my time, I can have a look at it then.
Also please confirm you want the code to be compared as follows.

.Interior.ColorIndexColourMatching CodeComment
18Redq
45Light GreenrAppearing as Orange to me
12Dark Greenp
 
Upvote 0
To check colour you are going to need VBA.
Is that what you had in mind ?

If it is I am about to log off and can't do it tonight, if that is what you want and you don't get someone to help you before tomorrow my time, I can have a look at it then.
Also please confirm you want the code to be compared as follows.

.Interior.ColorIndexColourMatching CodeComment
18Redq
45Light GreenrAppearing as Orange to me
12Dark Greenp
Yes! I need VBA code as well as i need to compare both the data and final checking with true data, cell color = data,pqr in other column

Thanks in advance…😊
Regards
Sanjeev
 
Upvote 0
I am not a huge fan of using UDFs and this is a bit ugly, but give it a try.

Called as:
Excel Formula:
=CompValues(A3,E3)

VBA Code:
Function CompValues(rColour As Range, rSymbol As Range) As Boolean

    Dim arrColour As Variant, arrSymbol As Variant
    Dim valColour As Currency, arrvalSymbol As Variant
    Dim i As Long
    
    CompValues = False
    arrColour = Array(18, 45, 12)
    arrSymbol = Array("q", "r", "p")
    
    valColour = rColour.Value
    arrvalSymbol = Split(rSymbol.Value, " ")
    
    If valColour = CCur(arrvalSymbol(0)) Then
        If rColour.Interior.ColorIndex = -4142 And UBound(arrvalSymbol) = 0 Then
            CompValues = True
            Exit Function
        Else
            For i = LBound(arrColour) To UBound(arrColour)
                If rColour.Interior.ColorIndex = arrColour(i) And _
                    arrvalSymbol(UBound(arrvalSymbol)) = arrSymbol(i) Then
                        CompValues = True
                        Exit Function
                End If
            Next i
        End If
    End If

End Function

20231022 VBA Text to Value TextBefore sksaVnjeev786.xlsm
ABCDEFGHIJK
1
2
3-0.60.81.7-0.60.81.7TRUETRUETRUE
4-7.6-7.2-2.9-7.6 q-7.2 q-2.9TRUETRUETRUE
5-6-3.9-3.6-6-3.9-3.6TRUETRUETRUE
63.63.94.63.6 r3.9 r4.6 pTRUETRUETRUE
7-5.9-4.9-3.4-5.9-4.9-3.4TRUETRUETRUE
8-5.5-4.9-1.7-5.5-4.9-1.7TRUETRUETRUE
Sheet1
Cell Formulas
RangeFormula
I3:K8I3=CompValues(A3,E3)
 
Upvote 1
Solution
I am not a huge fan of using UDFs and this is a bit ugly, but give it a try.

Called as:
Excel Formula:
=CompValues(A3,E3)

VBA Code:
Function CompValues(rColour As Range, rSymbol As Range) As Boolean

    Dim arrColour As Variant, arrSymbol As Variant
    Dim valColour As Currency, arrvalSymbol As Variant
    Dim i As Long
   
    CompValues = False
    arrColour = Array(18, 45, 12)
    arrSymbol = Array("q", "r", "p")
   
    valColour = rColour.Value
    arrvalSymbol = Split(rSymbol.Value, " ")
   
    If valColour = CCur(arrvalSymbol(0)) Then
        If rColour.Interior.ColorIndex = -4142 And UBound(arrvalSymbol) = 0 Then
            CompValues = True
            Exit Function
        Else
            For i = LBound(arrColour) To UBound(arrColour)
                If rColour.Interior.ColorIndex = arrColour(i) And _
                    arrvalSymbol(UBound(arrvalSymbol)) = arrSymbol(i) Then
                        CompValues = True
                        Exit Function
                End If
            Next i
        End If
    End If

End Function

20231022 VBA Text to Value TextBefore sksaVnjeev786.xlsm
ABCDEFGHIJK
1
2
3-0.60.81.7-0.60.81.7TRUETRUETRUE
4-7.6-7.2-2.9-7.6 q-7.2 q-2.9TRUETRUETRUE
5-6-3.9-3.6-6-3.9-3.6TRUETRUETRUE
63.63.94.63.6 r3.9 r4.6 pTRUETRUETRUE
7-5.9-4.9-3.4-5.9-4.9-3.4TRUETRUETRUE
8-5.5-4.9-1.7-5.5-4.9-1.7TRUETRUETRUE
Sheet1
Cell Formulas
RangeFormula
I3:K8I3=CompValues(A3,E3)
Thank you so much....Alex :) :)

This works perfectly!!!
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,204
Members
453,022
Latest member
RobertV1609

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