Update cell value by Command button

Closed
issahamameh Posts 22 Registration date Friday October 19, 2012 Status Member Last seen June 22, 2013 - Oct 19, 2012 at 01:59 PM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Oct 23, 2012 at 06:40 PM
Hello,

I would be very grateful if someone can help me in the following issue.
I have excel sheet with almost 300 rows.
One of the columns I fill it through copy/paste as Value from another source. Then I goes to each cell (for example starting from C2 until C320 by doing the following: in each of the mentioned cells I press "F2" button then enter, "F2" then enter, ...etc until C320.

What I need, VBA code through command button to do this process of ("F2" enter).

Of course this process I need it to activate or to update the current format in each cell.

Thanks in advance to any support or help.
Best regards,

Related:

3 responses

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Oct 19, 2012 at 06:00 PM
I am bit confused here.
F2 key is supposed to make a cell ready for edits. So are you saying that you press F2, and then just type "f2" in the cell ?
0
issahamameh Posts 22 Registration date Friday October 19, 2012 Status Member Last seen June 22, 2013 1
Oct 20, 2012 at 01:33 AM
Hi Rizvisa1,
Thanks a lot to your help.

I need a command button to make the process of pressing "F2" which is for edit as you said and then to press Enter. I don't want to change the cells contents. I'm doing this process to update the cell value format. For example if cell C3 content is (55555) and I change the format through "Customize" to be like this(55-555) so it will not take this effect unless I pressed F2 then enter.

Therefore, I don't need to fill or to type any thing, just pressing F2 then Enter.

This process I need it for this range (C3:C320).

Thank you in advance.
0
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Oct 20, 2012 at 06:43 AM
try this
1 Select range C3:C320
2. Goto to Data --> Text To Columns and click
3. In the wizard, select "Delimited" and press next
4. Unselect all check boxes and press next
5. select "General" and press finish
6. apply the format that you wanted

see if this works for u.
0
Thanks a lot again rizvisa1,

I tried all the steps as mentioned, but the same result, I mean after I did all the steps, I copied and pasted values to the mentioned range (C3:C320 ) but it didn't took the defined formats, so for each cell I pressed "F2" then pressed "Enter" to take the defined formats.

Isn't there any code to do this process of "F2" then "Enter" for that list?

Thanks a lot,
Issa
0
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Oct 22, 2012 at 05:27 PM
Issa, could you please post a sample book with some sample data that has that issue. for ,me it worked. For posting book, choose as public file sharing site and post back the link to the file back here

thanks
0
Ok, I will post an example, but how can I do that? I never did it before!

Thanks a lot.
BR,
0
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Oct 23, 2012 at 06:40 PM
Issa, try using speedyshare.com. You can upload file there. It will give you a link to the file, copy that link and paste it back here
0