Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

.txt Formatting

Posted on 2013-12-30
14
Medium Priority
?
264 Views
Last Modified: 2013-12-31
Hi Experts,

Need Code For This Process.
There are 2 workbooks Uploader & Downloader. Want to create text file in specific format. So process is from download workbook – from Sheet “Start” To “Finish” Uploader workbook copy data one by one & create text file for each sheet from Downloader.

On Click Of Button “Create” - in workbook Uploader – Data

01.

Copy Data from workbook “Downloader” From very 1st sheet after Sheet name “Start” & past to workbook – Uploader – Data – Cell A1.

02.

Count Data range from Cell A2 to till end (ctrl+Shift+Downarrow).

03.

Assume there is Count 500 then in sheet Text copy formula from A2 & past till A499.

04.

Select All and create .txt file with name Workbook – Uploader – Data – C3 & save file in same location. (If same name exist then over past)

05.

Step 5 Next Sheets till Sheet “Finish”.

06.

End

Thank You
Downloader.xlsx
Uploader.xlsm
0
Comment
Question by:Naresh Patel
[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
  • 9
  • 5
14 Comments
 
LVL 40

Expert Comment

by:als315
ID: 39747688
Look at sample
Uploader1.xlsm
0
 
LVL 8

Author Comment

by:Naresh Patel
ID: 39747753
Mr.als315,

There is 7 sheets in Uploader & 2 are identical so final result must be 6 .txt file but in this it create only one with all data in it.& it names "Workboot-Uploader—Data-C3" but it should be from workbook - sheet data - Cell C3. which is ACC LTD.


Thanks
0
 
LVL 40

Accepted Solution

by:
als315 earned 2000 total points
ID: 39747807
Naming was not clear. Can you show examples of file names? Should I take names from C1 cell in worksheets in Downloader.xlsx file?
Uploader2.xlsm
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Author Comment

by:Naresh Patel
ID: 39747814
Yes i.e. .txt 1 to 6   like this ACC LTD, AMBUJA CEMENTS, ASIAN PAINTS LTD, AXIS BANK LTD, BAJAJ AUTO LTD, BANK OF BARODA.



Thanks
0
 
LVL 40

Expert Comment

by:als315
ID: 39747819
Try sample Uploader2 from comment above
0
 
LVL 8

Author Comment

by:Naresh Patel
ID: 39747828
Sorry I dint see attachment.......yes so far working fine...super cool.   :) I am closing question but just in case if required I will ask you in this window only thanks
0
 
LVL 8

Author Closing Comment

by:Naresh Patel
ID: 39747829
Thanks & Thanks For Promptness .....& Happy New Year.   :)
0
 
LVL 8

Author Comment

by:Naresh Patel
ID: 39747966
May I get some little help on same question?
0
 
LVL 8

Author Comment

by:Naresh Patel
ID: 39747977
Mr.als315,

Need one more line in code - while transition from Downloader to Uploader workbook there is "#N/A N/A" in many cells, want to replace that with "0" i.e. Numerical value zero.



Possible ..?

Thanks
0
 
LVL 40

Expert Comment

by:als315
ID: 39747979
Possible, but can you show sample?
0
 
LVL 8

Author Comment

by:Naresh Patel
ID: 39747993
Mr.als315,


Sure pls see attached file..



Thanks
Downloader.xlsx
0
 
LVL 40

Expert Comment

by:als315
ID: 39748015
Change For cycle to:
            For j = Asc("B") To Asc("G")
                If InStr(1, wsu.Range(Chr(j) & i), "#") = 1 Then
                    Str = Str & ",0"
                Else
                    Str = Str & "," & wsu.Range(Chr(j) & i)
                End If
            Next j

Open in new window

0
 
LVL 8

Author Comment

by:Naresh Patel
ID: 39748021
Thank You
0
 
LVL 8

Author Comment

by:Naresh Patel
ID: 39748028
Mr.als315,

just asking & requesting would you like to solve my other question? if you feel free, as today is last day of the year. If "No" then no hard feelings. Happy New Year.

Math2

Thank You
0

Featured Post

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

This article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
Outlook for dependable use in a very small business   This article is about using the Outlook application (part of Microsoft Office) in a very small business, or for homeowners where dependability and reliability are critical requirements. This …
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
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…

705 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