Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-03-2016, 01:39 AM
markrose markrose is offline Excel list help please :( Windows 10 Excel list help please :( Office 2016
Novice
Excel list help please :(
 
Join Date: May 2016
Posts: 5
markrose is on a distinguished road
Default Excel list help please :(


Hi. I have two separate lists, one with company sector(1) and one without (2). I have merged the two lists and want to populate the (2) list with the correct sector(from the corresponding (1) list). The sheet has 140000 entries so copy and paste is simply killing me.

Can anyone help me with a formula to solve this please??
COLUMN A Column B

2Calor Gas Ltd
2Calor Gas Lt[/B]d
1BUSINESS & INDUSTRIAL 1Calor Gas Ltd

2Cambridge Manufacturing Company Ltd
2Cambridge Manufacturing Company Ltd
2Cambridge Manufacturing Company Ltd
2Cambridge Manufacturing Company Ltd
2Cambridge Manufacturing Company Ltd
2Cambridge Manufacturing Company Ltd[/B]
1PHARMACEUTICAL 1Cambridge Manufacturing Company Ltd
Reply With Quote
  #2  
Old 05-03-2016, 02:52 AM
markrose markrose is offline Excel list help please :( Windows 10 Excel list help please :( Office 2016
Novice
Excel list help please :(
 
Join Date: May 2016
Posts: 5
markrose is on a distinguished road
Default

To be clear - as an example - Calor Gas

(sector)Row 1 column A (Empty) (Company) Row 1 column B "Calor gas" (from list 2)
(sector)Row 2 column A (Empty) (Company) Row 2 column B "Calor gas" (from list 2)
(sector)Row 3 Column A ("Business & Industrial") (Company) Row 3 column B "Calor gas" (from list 1)

I would like to create a formula that looks up Company(Column B) List 1 and corresponding sector(in column A)- then identifies matching company from list 2 (in the same column) and populates the empty cell in column A: with the correct sector from list 1 COLUMN A.
Reply With Quote
  #3  
Old 05-03-2016, 03:48 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Excel list help please :( Windows 7 64bit Excel list help please :( Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,779
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Hi
please post a sample sheet showing what you have and expected results. Easier to work with.
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #4  
Old 05-03-2016, 07:23 AM
markrose markrose is offline Excel list help please :( Windows 10 Excel list help please :( Office 2016
Novice
Excel list help please :(
 
Join Date: May 2016
Posts: 5
markrose is on a distinguished road
Lightbulb clarification in sheet :) thank you

please see the attached for an example and the example outcome. thankEXCEL LIST ISSUE.xlsx you
Reply With Quote
  #5  
Old 05-03-2016, 03:31 PM
jeffreybrown jeffreybrown is offline Excel list help please :( Windows Vista Excel list help please :( Office 2007
Expert
 
Join Date: Apr 2016
Posts: 673
jeffreybrown has a spectacular aura aboutjeffreybrown has a spectacular aura about
Default

Code:
Can anyone help me with a formula to solve this please??
IMHO, a macro might be easier to work with as with a formula you would have to use a column other than A and then copy and paste.

This macro will look for the last row of column B and then apply the results from column A from the bottom up.

Code:
Sub FillRangeFromAbove()
    Dim LR As Long
    Dim i As Long
    LR = Range("B" & Rows.Count).End(xlUp).Row
    For i = LR To 2 Step -1
        If Range("A" & i - 1).Value = "" Then
            Range("A" & i - 1).Value = Range("A" & i).Value
        End If
    Next i
End Sub
If you are not familiar with macros, this might help...

http://www.rondebruin.nl/win/code.htm
Reply With Quote
  #6  
Old 05-04-2016, 02:02 AM
markrose markrose is offline Excel list help please :( Windows 10 Excel list help please :( Office 2016
Novice
Excel list help please :(
 
Join Date: May 2016
Posts: 5
markrose is on a distinguished road
Default

@jeffrybrown Thank you so much for adding the macro. I have taken a look at the link to help me add it and I am really struggling.

I am on excel 2016 and the ctrlF11 opens a macro tab. I cant get the VBA to open - Have tried ctrl r. SO , in short i dont know how to use the macro.

I have added it to the macro sheet that opened and tried adding it to the actual worksheet ( which it will not paste to )

On the macro sheet, it appears over 10 rows - but from here I am really lost.

Can you guide me please?
Reply With Quote
  #7  
Old 05-04-2016, 04:15 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Excel list help please :( Windows 7 64bit Excel list help please :( Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,779
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Did you have a look at the link jeffrey provided?
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #8  
Old 05-04-2016, 04:33 AM
jeffreybrown jeffreybrown is offline Excel list help please :( Windows Vista Excel list help please :( Office 2007
Expert
 
Join Date: Apr 2016
Posts: 673
jeffreybrown has a spectacular aura aboutjeffreybrown has a spectacular aura about
Default

Quote:
ctrlF11 opens a macro tab
From the link provided, you may have missed this...

Quote:
Open the VBA editor

Open the VBA editor with the shortcut Alt+F11.
Paste code in a Normal module
  • Where to paste code
  • Highlight macro to copy >> Ctrl + C >> Open your workbook
  • Alt + F11 >> opens the Visual Basic Editor (VBE)
  • Ctrl + R >>opens the Project Explorer (if not already open on left side of screen)
  • Insert menu >> Module or Alt + I, M >> activates the Insert menu and inserts a Standard Module
  • Paste code >> Ctrl + V (right side of screen)
  • Alt + Q >> exits VBE and returns to Excel
  • Back in Excel >> Alt + F8 >> Macro Dialog Box >> Highlight macro >> Run

Make sure you are on the sheet you want to run the macro on before you run the macro.

In the macro provided I did not qualify the sheet.
Reply With Quote
  #9  
Old 05-04-2016, 06:14 AM
markrose markrose is offline Excel list help please :( Windows 10 Excel list help please :( Office 2016
Novice
Excel list help please :(
 
Join Date: May 2016
Posts: 5
markrose is on a distinguished road
Default

@jeffreybrown - You are a superstar - saved me years of my life - thank you for all your help.
Reply With Quote
Reply

Tags
excel2016, formula help, list



Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel list help please :( How to import list from Excel into drop-down list into word ahw Word VBA 43 02-28-2020 08:11 PM
Excel list help please :( Excel Combobox List VBA-User Excel Programming 4 01-07-2016 02:46 AM
Populate Word Drop-down list with Excel column then auto fill form fields with Excel data Faldinio Word VBA 7 10-19-2014 06:03 AM
How to export contact list to Excel ksimmonds Outlook 2 12-07-2011 09:33 PM
Searchable list in excel? leahca Excel 7 11-24-2011 04:44 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:57 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft