VBA how to create new worksheet and move value

Solved/Closed
yogi_himalayan Posts 2 Registration date Tuesday 12 March 2013 Status Member Last seen 13 March 2013 - 12 Mar 2013 à 05:30
rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 - 17 Mar 2013 à 07:55
Hello there,

I am zero in vba, can anyone please assist me what code to be used given following conditon

Given,(I have data converted from csv to xls as follows)
1. I have alphabetical data in column 'I'
2. Numeric data on column 'L' and 'm'

Output I want

1. create new worksheet in same workbook and name it 'Recs'
2. Move only value from column 'I' to column 'A' of 'Recs'
3. Move numeric data of ''L' and 'M' (value only) to column 'B' of 'Recs' But it should be moved meeting condition =if(L1>=0,-L1,M1)
4. create a message box named 'send email' so if I click on that message box, only worksheet 'Recs'get attached to my 'new email' of outlook express

Hope the the way I have defined above makes sense and not too demanding, :-). Please let me know if any further detail would be helpful.

Thanks in advance for your assistance.




Related:

2 responses

yogi_himalayan Posts 2 Registration date Tuesday 12 March 2013 Status Member Last seen 13 March 2013 1
13 Mar 2013 à 00:02
Thanks Trowa, for your advice. But I am looking for VBA code.
rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 766
16 Mar 2013 à 12:18
Yogi
Do this
1. Start excel
2. Start macro recorder
3. open you CSV file
4. Sort column I to get all data together
5. Create a new worksheet and rename it 'RECS'
6. Copy from your sorted sheet paste it to Recs sheet.
7. Place the formula in column B of Recs sheet. Just put the sheet name with an ! before the cell references as in Sheet1!L1.
8 Stop macro recorder.

This gives you a good template of what you are trying to do. Paste your resulting macro here
yogi_himalayan
16 Mar 2013 à 19:47
Thanks rizvisa.
rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 766
17 Mar 2013 à 07:55
actually your thanks are due to TrowaD. I just copied what he said and added part about macro recorder :)
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 555
12 Mar 2013 à 12:16
Hi Yogi,

1. do this manually.
2. Sort column I to get all data together, now cut/paste it to Recs sheet.
3. Place the formula in column B of Recs sheet. Just put the sheet name with an ! before the cell references as in Sheet1!L1.
4. I have no idea how to create email using excel. Sorry

Best regards,
Trowa