Excel උදව්වක් ඕන (VBA හරි කමක්නෑ)

TakaTakas

Well-known member
  • Nov 20, 2014
    2,865
    1,007
    113
    ගෙදර
    Excel උදව්වක් ඕන (VBA හරි කමක්නෑ)

    hHrvNmo.jpg


    මේ වගේ කොලම් දෙකක තියන නම්බර්ස් වගයක් තියනවා.මේකෙ පාට කරල තියනවා වගේ සමාන අංක තියන සෙල් පාට වෙන්න ඕන.හැබැයි Row බයි Row වෙන්න ඕන.උදා හරණයක් විදියට A2 සෙල් එක සමානද කියල බලන්න ඕන B2 සෙල් එකත් එක්ක විතරයි.අනිත් මොන සෙල් එක A2 ට සමාන උනත් වැඩක් නෑ.ඒ විදියට මේ පිංතූරෙ තියනවා වගේ 2 වෙනි Row එකේ A2 = B2 ඒක නිසා ඒසෙල් දෙක පාට උනා.A3 සෙල් එක B3 ට සමාන නෑ.ඒක නිසා ඒවා පාට උනේ නෑ.හැබැයි A3 = B8 , එහෙම උනාට ඒ සෙල් පාට වෙලා නෑ.(ඒ කියන්නෙ මම දන්න තරමින් conditional formatting පාවිච්චි කරන්න බෑ ) මේ වැඩේ කරගන්න පුළුවන් VBA කෝඩ් එකක් හරි වෙන මෙතඩ් එකක් හරි දන්න කෙනෙක් කියල දෙන්න පුළුවන්ද ?
     

    Pathumpiyasa

    Active member
  • Sep 5, 2013
    483
    165
    43
    Sub test()
    i = 1
    Do While (Sheets("sheet1").Cells(i, 1) <> "")

    If Sheets("sheet1").Cells(i, 2) = Sheets("sheet1").Cells(i, 1) Then

    Sheets("sheet1").Cells(i, 2).Select
    With Selection.Interior
    .Pattern = xlSolid
    .PatternColorIndex = xlAutomatic
    .ThemeColor = xlThemeColorAccent2
    .TintAndShade = 0.599993896298105
    .PatternTintAndShade = 0
    End With

    Sheets("sheet1").Cells(i, 1).Select
    With Selection.Interior
    .Pattern = xlSolid
    .PatternColorIndex = xlAutomatic
    .ThemeColor = xlThemeColorAccent2
    .TintAndShade = 0.599993896298105
    .PatternTintAndShade = 0
    End With
    End If

    x = x + 1
    i = i + 1
    Loop


    End Sub
     
    • Like
    Reactions: TakaTakas

    Pathumpiyasa

    Active member
  • Sep 5, 2013
    483
    165
    43
    Sheet name should be "sheet1"

    oka module ekakata dapan

    button ekak dapan sheet ekakata

    oya code eken wade wenwa hari giye naththan kiyapannnnn


    one time wadak nam function ekak use karapan
    =a1=b1
    trre tika filter karala colour ekak dapan
     
    Last edited:

    TakaTakas

    Well-known member
  • Nov 20, 2014
    2,865
    1,007
    113
    ගෙදර
    Sheet name should be "sheet1"

    oka module ekakata dapan

    button ekak dapan sheet ekakata

    oya code eken wade wenwa hari giye naththan kiyapannnnn


    one time wadak nam function ekak use karapan
    =a1=b1
    trre tika filter karala colour ekak dapan

    ගොඩක් ස්තූතියි මචං මම ට්‍රයි කරල බලන්නම්.
     

    wqe123

    Well-known member
  • Aug 21, 2015
    9,779
    12,949
    113
    ලංකාවේ.. ලංකාවේ
    "හැබැයි A3 = B8 , එහෙම උනාට ඒ සෙල් පාට වෙලා නෑ."

    උබට ඕනේ duplicate වෙච්ච value එකක් මාර්ක් කරන්න වගේ තාමා මට තේරුනේ
    එක හරි නම්



    excel2013 - conditional format වල "format only unique or duplicate value" දාල "duplicate" ටික මාර්ක් කරගන්න එක කරන්න පුලුවන්
     
    Last edited:

    Ek buwa

    Member
    Jun 21, 2018
    270
    19
    0
    select the two columns first.
    and then in HOME tab click on "Conditional Formatting"
    then click on "New Rule"
    then select "Use a formula to determine which cells to format"
    add this formula "=$B1=$A1" in the text box below.
    then click on FORMAT button. click FILL tab.
    select a color you want to highlight the duplicate values.
    Click OK and again OK.

    hope this will work.
     

    imhotep

    Well-known member
  • Mar 29, 2017
    14,861
    8
    35,448
    113
    This is easily done by a conditional formatting rule.
    Select your two columns by first selecting the firs row.
    Then Conditional Formatting --> New Rule ---> Use a formula to determine which cells to format
    Type in the rule description =$A1=$B1
    Press Format button - select colour
    Press OK - it's done.
     

    imhotep

    Well-known member
  • Mar 29, 2017
    14,861
    8
    35,448
    113
    Sorry.. I replied while looking only at Page No#1 - only later saw that the member Ek buwa has already posted exactly the same.:oo:
     

    TakaTakas

    Well-known member
  • Nov 20, 2014
    2,865
    1,007
    113
    ගෙදර
    උදව් කරපු හැමෝටම ස්තූතියි.මෙන්න මේක තමයි මට ඇත්තටම කරගන්න ඕන.

    oMEN0Vf.jpg


    Link
     

    Kasun93 rox

    Well-known member
  • Jun 12, 2012
    985
    280
    83
    Ara kali kiyala tibba conditional formatting walin karanna puluwanne bn oka.

    Oya button eke case eka nm ba ithn ehema
     

    TakaTakas

    Well-known member
  • Nov 20, 2014
    2,865
    1,007
    113
    ගෙදර
    machan ube spread sheet eka dapan mata hadala dennam online upload karala link danna

    "හැබැයි A3 = B8 , එහෙම උනාට ඒ සෙල් පාට වෙලා නෑ."

    උබට ඕනේ duplicate වෙච්ච value එකක් මාර්ක් කරන්න වගේ තාමා මට තේරුනේ
    එක හරි නම්



    excel2013 - conditional format වල "format only unique or duplicate value" දාල "duplicate" ටික මාර්ක් කරගන්න එක කරන්න පුලුවන්

    Bumpation :rolleyes:

    Can do using conditional formatting. send me the spreadsheet I will do


    select the two columns first.
    and then in HOME tab click on "Conditional Formatting"
    then click on "New Rule"
    then select "Use a formula to determine which cells to format"
    add this formula "=$B1=$A1" in the text box below.
    then click on FORMAT button. click FILL tab.
    select a color you want to highlight the duplicate values.
    Click OK and again OK.

    hope this will work.


    This is easily done by a conditional formatting rule.
    Select your two columns by first selecting the firs row.
    Then Conditional Formatting --> New Rule ---> Use a formula to determine which cells to format
    Type in the rule description =$A1=$B1
    Press Format button - select colour
    Press OK - it's done.


    Sorry.. I replied while looking only at Page No#1 - only later saw that the member Ek buwa has already posted exactly the same.:oo:


    Ara kali kiyala tibba conditional formatting walin karanna puluwanne bn oka.

    Oya button eke case eka nm ba ithn ehema

    සේරටම ස්තූතියි.
    කන්ඩිෂනල් ෆෝමැටින් වලින් කරන්න පුළුවන් ඒත් මම උඩින් කියල තියන විදියට කරගන්න තිබුනනම් තමයි හොද.තාම බැරිඋනා මචං වැඩේ කරගන්න.පුළුවන් එකෙක් ඉන්නවනම් ඔය දාල තියන ලින්ක් එකෙන් ගිහින් මගෙ ෆයිල් එක බාගෙන ඒකෙ කෝඩ්එක සෙට් කරල දෙනවද?
    https://drive.google.com/open?id=1x8rCwtLCXn24yEL8V73_ZCYYw1NnTA-O