1. Hello there guest and Welcome to The #1 Classic Mustang forum!
    To gain full access you must Register. Registration is free and it takes only a few moments to complete.
    Already a member? Login here then!

Any Excel programmers out there?

Discussion in 'Non Mustang General Discussion' started by FordDude, Apr 26, 2017.

  1. FordDude

    FordDude Well-Known Dude Staff Member Moderator

    I am a novice with excel programming. I can do simple things. But the formula I need to use is going to look like an algebra formula from my high school days 40+ years ago.
    Simply put 4 columns, first being the store number then the city and address. I want the store numbers to be in numeral order no matter how I enter them. So the entire row needs to shift position. Anyone?


    Just for looking here is a playboy playmate waiting for you...

    Last edited: Apr 26, 2017
  2. msell66

    msell66 Burning Fossil Fuels Donator

    Do you have the ss already made?
  3. Jonk67

    Jonk67 Well-Known Member

    Can't you just add a filter to all 4 columns and turn the first column filter to sort smallest to largest? The filter has to be at the top row of all 4 to keep the info together for each store.

    Sent from my XT1053 using Tapatalk
  4. stangg

    stangg Active Member

    I tweaked a little code via google search... This immediately sorts column A as soon as you enter a value into column A.

    Maybe this will get you started. Drop this code into "Sheet 1" using the VBA Project editor.
    You will probably need to activate the developer tab in the excel ribbon.

    Once pasted, just go into sheet 1 and type numbers into column a.

    Private Sub Worksheet_Change(ByVal Target As Range)
    cur_cell_row = ActiveCell.Row
    cur_cell_col = ActiveCell.Column

    Dim KeyCells As Range

    ' The variable KeyCells contains the cells that will
    ' cause an alert when they are changed.
    Set KeyCells = Range("A1:C100000")

    If Not Application.Intersect(KeyCells, Range(Target.Address)) _
    Is Nothing Then
    End If

    Cells(cur_cell_row, cur_cell_col).Select

    End Sub

    Sub sort_a()
    ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add Key:=Range("A1"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortTextAsNumbers
    With ActiveWorkbook.Worksheets("Sheet1").Sort
    .SetRange Range("A2:D100")
    .Header = xlNo
    .MatchCase = False
    .Orientation = xlTopToBottom
    .SortMethod = xlPinYin
    End With

    End Sub

    Do I win the prize :):)
    FordDude likes this.
  5. FordDude

    FordDude Well-Known Dude Staff Member Moderator

    What I started with was merging cells (bcd) (efg) and (hi). So when I do the filter thing it is giving me a raspberry and saying the cells need to be the same size. So I started over and dragged the cells to make them longer. It does work now, but I will have to highlight the whole page to get them in order. This company is adding stores, and I wanted to add at the bottom hit enter and have it find its place. This will work for now. Thanks...

  6. FordDude

    FordDude Well-Known Dude Staff Member Moderator

    We are all winners here at the Fix. I will give it a try. Tanks


  7. RapidRabbit

    RapidRabbit Well-Known Member

    Wait, there was question in there.

    Column A , hot red head?
    Did I get it right?

    Sent from my XT1058 using Tapatalk
    tarafied1 likes this.
  8. tarafied1

    tarafied1 Well-Known Member

    I don't know what mumbo jumbo they are rambling about but but I scrolled down to see if there was more pics and there was all this weird typing stuff...
  9. msell66

    msell66 Burning Fossil Fuels Donator

    That shit's out of my league!
  10. 6t6red

    6t6red Well-Known Member

    Damn geeks. Im to old for that stuff.
  11. scedd

    scedd Well-Known Member

    Can we have more pictures instead?
    tarafied1 likes this.
  12. janschutz

    janschutz Corn Hauler


    oh wait, that is what I do for a living.
  13. Midlife

    Midlife Well-Known Member Staff Member Moderator

    What is an Excel?

    All I know is that I would love to spread her sheets...
    tarafied1, RapidRabbit and 6t6red like this.
  14. 6t6red

    6t6red Well-Known Member

    I havent laughed this hard for along time.
  15. Horseplay

    Horseplay I Don't Care. Do you?

    Just post up more pics of the girl already!
    RapidRabbit likes this.
  16. msell66

    msell66 Burning Fossil Fuels Donator

    Dammit, Tim's pic is not showing up on mobile app.
  17. tarafied1

    tarafied1 Well-Known Member

    just a playboy bunny, looks like this
    FordDude likes this.
  18. FordDude

    FordDude Well-Known Dude Staff Member Moderator

    Worked on my cell phone, but the tank did not.

  19. Gigantopithecus

    Gigantopithecus Well-Known Member

    Hell, I'm a geek by trade and that crap is over my head.

    Sent from my HTC One using Tapatalk
    6t6red likes this.
  20. StangFix

    StangFix Member Staff Member Administrator

    did this get solved?

Share This Page