Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

EXCEL VBA CODE

Posted on 2014-02-25
3
Medium Priority
?
460 Views
Last Modified: 2014-02-26
Hi

How do I write VBA code for this please:

Domestic<space>Airlines<Alt+Enter>LIST

(note: it could have a space after the word Airlines if necessary)

Many thanks
0
Comment
Question by:GAILBAKER
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 93

Accepted Solution

by:
Patrick Matthews earned 2000 total points
ID: 39887771
If you are trying to write that to a cell:

Range("a1") = "Domestic Airlines" & Chr(10) & "LIST"
Rows(1).AutoFit

Open in new window

0
 

Author Comment

by:GAILBAKER
ID: 39887993
Many thanks Patrick - it worked:

Sub X()
'
' X Macro
'

'
        Cells.Find(What:="DOMESTIC AIRLINES" & Chr(10) & "LIST", After:=ActiveCell, LookIn:= _
        xlFormulas, LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:= _
        xlNext, MatchCase:=False, SearchFormat:=False).Activate
End Sub

Best wishes, Gail
0
 
LVL 93

Expert Comment

by:Patrick Matthews
ID: 39888685
Glad to help :)
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
Gain an elementary understanding of Blockchain technology.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question