• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Excel Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Excel Question


  • Subject: Excel Question
  • From: "Simon, Garry" <email@hidden>
  • Date: Mon, 03 Nov 2014 15:04:04 +0000
  • Thread-topic: Excel Question

Hi, I’m having difficulty writing a script that finds merged cells in an Excel sheet, unmerges them, and copies the value of the merged cell to each of the unmerged cells. I found a macro that does this on the interwebs:

 

Sub FindMergedCellsUnmergeThemAndFillThem()

  Dim MergedCell As Range, FirstAddress As String, MergeAddress As String, MergeValue As Variant

  Application.FindFormat.MergeCells = True

  Do

    Set MergedCell = ActiveSheet.UsedRange.Find("", LookAt:=xlPart, SearchFormat:=True)

    If MergedCell Is Nothing Then Exit Do

    MergeValue = MergedCell.Value

    MergeAddress = MergedCell.MergeArea.Address

    MergedCell.MergeArea.UnMerge

    Range(MergeAddress).Value = MergeValue

  Loop

  Application.FindFormat.Clear

End Sub

 

However, I need to do the same thing with an AppleScript that works with Excel 2008 or newer. Does anyone have a solution?

 

Thanks,

Garry

Follow Quad/Graphics in social media
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Re: Formatting fonts
  • Next by Date: Re: Formatting fonts
  • Previous by thread: Re: Formatting fonts
  • Next by thread: Indesign custom dialogs
  • Index(es):
    • Date
    • Thread