• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Check Column B for Changes in Column A|VBA & Macros|Excel Forum|My Online Training Hub

You are here: Home / Check Column B for Changes in Column A|VBA & Macros|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumVBA & MacrosCheck Column B for Changes in Colum…
sp_PrintTopic sp_TopicIcon
Check Column B for Changes in Column A
Avatar
Adrian Miles

New Member
Members
Level 0
Forum Posts: 2
Member Since:
March 8, 2019
sp_UserOfflineSmall Offline
1
March 8, 2019 - 8:09 am
sp_Permalink sp_Print

HI Guys

 

i have a spreadsheet that looks like this

A                       B

C001                 Value 1

C001                 Value 1

C001                 Value 1b

C002                 Value 3

C002                 Value 3

C003                Value 3b

C004                Value 4

 

What i am trying to achieve is a script that will look at the first Column A value - and will compare it to each Column B value UNTIL there is a change in Column A and then start again ......so the net result would be

 

A                       B               C

C001                 Value 1       ok

C001                 Value 1        ok

C001                 Value 1b      different

C002                 Value 3         ok

C002                 Value 3         ok

C003                Value 3b        different

C004                Value 4           ok

 

Any thoughts on how to achieve this???

Avatar
SunnyKow
Puchong, Malaysia

VIP
Members


Trusted Members
Level 8
Forum Posts: 1432
Member Since:
June 25, 2016
sp_UserOfflineSmall Offline
2
March 8, 2019 - 10:35 am
sp_Permalink sp_Print

Hi Adrian

Maybe you can try a formula.

See if this helps.

Sunny

Avatar
Adrian Miles

New Member
Members
Level 0
Forum Posts: 2
Member Since:
March 8, 2019
sp_UserOfflineSmall Offline
3
March 8, 2019 - 12:58 pm
sp_Permalink sp_Print

HI Sunny

 

the problem is the full sheet can have many many entries in column A

 

like the attached

Avatar
SunnyKow
Puchong, Malaysia

VIP
Members


Trusted Members
Level 8
Forum Posts: 1432
Member Since:
June 25, 2016
sp_UserOfflineSmall Offline
4
March 8, 2019 - 4:45 pm
sp_Permalink sp_Print

Hi Adrian

It doesn't matter how many rows you have.

In cell C2 enter ok.

In cell C3 enter =IF(C2="different","ok",IF(A3&B3=A2&B2,"ok","different")) and then double click on the bottom right corner of C3 (where a tiny black square appears) to copy (fill) the formula downwards.

I did note that your data is not "clean". For eg. cell B37. It looks similar to B36 but there is an extra space after the letters pF. This can cause erroneous result. You may need to remove such spaces for the formula to work correctly.

Sunny

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Roslyn Finlayson
Guest(s) 11
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
John Chisholm
vexokeb sdfg
John Jack
Malcolm Toy
Ray-Yu Yang
George Shihadeh
Naomi Rumble
Uwe von Gostomski
Jonathan Jones
drsven
Forum Stats:
Groups: 3
Forums: 24
Topics: 6210
Posts: 27236

 

Member Stats:
Guest Posters: 49
Members: 31888
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.