Excel精英培训网

 找回密码
 注册
数据透视表40+个常用小技巧,让你一次学会!
查看: 2548|回复: 7

[已解决]请教如何才能使用回车键达到下表的输入效果

[复制链接]
发表于 2010-2-26 23:08 | 显示全部楼层 |阅读模式
请教如何才能使用回车键达到下表的输入效果    
(输入顺序从1-2-3-4-5-6-7-8…………...)    
范围从B5:E13    
    
1 2 3 4 
5 6 7 8 
9 10 11 12 
. … … … 
最佳答案
2010-2-26 23:44
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count = 1 Then
    If Not Intersect(Target, [B5:E13]) Is Nothing Then
        If Target.Column <> 5 Then
            Target.Offset(, 1).Activate
        Else
            Cells(Target.Row + 1, 2).Activate
        End If
    End If
End If
End Sub
R65zjTc4.rar (6.55 KB, 下载次数: 6)
excel精英培训的微信平台,每天都会发送excel学习教程和资料。扫一扫明天就可以收到新教程
发表于 2010-2-26 23:28 | 显示全部楼层

工具=选项=编辑=enter向右,框选B5:E13后输入

或者直接框选B5:E13按tab输入

回复

使用道具 举报

 楼主| 发表于 2010-2-26 23:41 | 显示全部楼层
回复

使用道具 举报

发表于 2010-2-26 23:44 | 显示全部楼层    本楼为最佳答案   

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count = 1 Then
    If Not Intersect(Target, [B5:E13]) Is Nothing Then
        If Target.Column <> 5 Then
            Target.Offset(, 1).Activate
        Else
            Cells(Target.Row + 1, 2).Activate
        End If
    End If
End If
End Sub
R65zjTc4.rar (6.55 KB, 下载次数: 6)
回复

使用道具 举报

 楼主| 发表于 2010-2-26 23:53 | 显示全部楼层

谢谢枯禅大师
回复

使用道具 举报

 楼主| 发表于 2010-2-26 23:55 | 显示全部楼层

怎么区域外的空格也右移了???
回复

使用道具 举报

发表于 2010-2-26 23:57 | 显示全部楼层

QUOTE:
以下是引用bipl607在2010-2-26 23:55:00的发言:
怎么区域外的空格也右移了???

不明白你说的是怎么回事

再想了一下,估计您是按2楼的设置过了将“工具=选项=编辑=enter向右”改回来向下

[此贴子已经被作者于2010-2-27 0:05:48编辑过]
回复

使用道具 举报

 楼主| 发表于 2010-2-27 00:55 | 显示全部楼层

枯禅大师你料事如神,真的按2楼的设置过了,谢谢你!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|Excel精英培训 ( 豫ICP备11015029号 )

GMT+8, 2024-5-17 00:30 , Processed in 0.283622 second(s), 8 queries , Gzip On, Yac On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表