我需要一个VBA循环,在整个工作表中搜索“COUNTRY”这个词,每次遇到它时,它都会用“UK”替换右边的单元格+1。
请放心,这是必要的,不能用一列公式来完成,因为单词COUNTRY分散在工作表周围很多次并且是不规则的。
我真的想从一些代码开始,但我找不到这样做的方法。提前谢谢!
答案 0 :(得分:1)
这是您的VBA代码,
Owns Monitor Lock on com/ibm/ws/classloading/internal/ThreadContextClassLoader@0x00000000C8FAA768
Waiting for Monitor Lock on com/ibm/ws/classloading/internal/AppClassLoader@0x00000000C4126BA8
at java/lang/ClassLoader.loadClass(ClassLoader.java:805(Compiled Code))
at com/ibm/ws/classloading/internal/UnifiedClassLoader.findClass(UnifiedClassLoader.java:116(Compiled Code))
at java/lang/ClassLoader.loadClassHelper(ClassLoader.java:846(Compiled Code))
at java/lang/ClassLoader.loadClass(ClassLoader.java:825(Compiled Code))
at com/ibm/ws/classloading/internal/UnifiedClassLoader.loadClass0(UnifiedClassLoader.java:108)
at com/ibm/ws/classloading/internal/UnifiedClassLoader$Delegation.loadClass(UnifiedClassLoader.java:79)
at com/ibm/ws/classloading/internal/UnifiedClassLoader.loadClass(UnifiedClassLoader.java:103)
at com/ibm/ws/classloading/internal/ThreadContextClassLoader.loadClass(ThreadContextClassLoader.java:112)
at java/lang/ClassLoader.loadClass(ClassLoader.java:805(Compiled Code))
at java/util/ResourceBundle$Control.newBundle(ResourceBundle.java:2666)
at java/util/ResourceBundle.loadBundle(ResourceBundle.java:1527(Compiled Code))
at java/util/ResourceBundle.findBundle(ResourceBundle.java:1491(Compiled Code))
at java/util/ResourceBundle.findBundle(ResourceBundle.java:1445(Compiled Code))
at java/util/ResourceBundle.getBundleImpl(ResourceBundle.java:1380(Compiled Code))
at java/util/ResourceBundle.getBundle(ResourceBundle.java:1093)
at org/apache/bval/jsr/DefaultMessageInterpolator.loadBundle(DefaultMessageInterpolator.java:200)
at org/apache/bval/jsr/DefaultMessageInterpolator.getFileBasedResourceBundle(DefaultMessageInterpolator.java:177)
at org/apache/bval/jsr/DefaultMessageInterpolator.findUserResourceBundle(DefaultMessageInterpolator.java:283)
at org/apache/bval/jsr/DefaultMessageInterpolator.(DefaultMessageInterpolator.java:82)
at org/apache/bval/jsr/DefaultMessageInterpolator.(DefaultMessageInterpolator.java:69)
at org/apache/bval/jsr/ConfigurationImpl.(ConfigurationImpl.java:77)
at org/apache/bval/jsr/ApacheValidationProvider.createGenericConfiguration(ApacheValidationProvider.java:63)
at javax/validation/Validation$GenericBootstrapImpl.configure(Validation.java:164)
at org/springframework/boot/autoconfigure/BackgroundPreinitializer$ValidationInitializer.run(BackgroundPreinitializer.java:107)
at org/springframework/boot/autoconfigure/BackgroundPreinitializer$1.runSafely(BackgroundPreinitializer.java:59)
at org/springframework/boot/autoconfigure/BackgroundPreinitializer$1.run(BackgroundPreinitializer.java:52)
at java/lang/Thread.run(Thread.java:785)
------------------------------------------
Owns Monitor Lock on com/ibm/ws/classloading/internal/AppClassLoader@0x00000000C4126BA8
Waiting for Monitor Lock on com/ibm/ws/classloading/internal/ThreadContextClassLoader@0x00000000C8FAA768
at java/lang/ClassLoader.loadClass(ClassLoader.java:824(Compiled Code))
at com/ibm/ws/classloading/internal/UnifiedClassLoader.loadClass0(UnifiedClassLoader.java:108)
at com/ibm/ws/classloading/internal/UnifiedClassLoader$Delegation.loadClass(UnifiedClassLoader.java:79)
at com/ibm/ws/classloading/internal/UnifiedClassLoader.loadClass(UnifiedClassLoader.java:103)
at com/ibm/ws/classloading/internal/ThreadContextClassLoader.loadClass(ThreadContextClassLoader.java:112)
at java/lang/ClassLoader.loadClass(ClassLoader.java:805(Compiled Code))
at org/apache/logging/log4j/util/LoaderUtil.loadClass(LoaderUtil.java:120)
at org/apache/logging/slf4j/Log4jLogger.createConverter(Log4jLogger.java:416)
at org/apache/logging/slf4j/Log4jLogger.(Log4jLogger.java:54)
at org/apache/logging/slf4j/Log4jLoggerFactory.newLogger(Log4jLoggerFactory.java:37)
at org/apache/logging/slf4j/Log4jLoggerFactory.newLogger(Log4jLoggerFactory.java:29)
at org/apache/logging/log4j/spi/AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:48)
at org/apache/logging/slf4j/Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:29)
at org/slf4j/LoggerFactory.getLogger(LoggerFactory.java:358)
at org/apache/commons/logging/impl/SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
at org/apache/commons/logging/impl/SLF4JLogFactory.getInstance(SLF4JLogFactory.java:132)
at org/apache/commons/logging/LogFactory.getLog(LogFactory.java:685)
at org/springframework/cloud/bootstrap/config/PropertySourceBootstrapConfiguration.(PropertySourceBootstrapConfiguration.java:63)
at java/lang/Class.forNameImpl(Native Method)
at java/lang/Class.forName(Class.java:348(Compiled Code))
at org/springframework/cglib/core/ReflectUtils.defineClass(ReflectUtils.java:415)
at org/springframework/cglib/core/AbstractClassGenerator.generate(AbstractClassGenerator.java:336)
at org/springframework/cglib/proxy/Enhancer.generate(Enhancer.java:492)
at org/springframework/cglib/core/AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:93)
at org/springframework/cglib/core/AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:91)
at org/springframework/cglib/core/internal/LoadingCache$2.call(LoadingCache.java:54)
at java/util/concurrent/FutureTask.run(FutureTask.java:277(Compiled Code))
at org/springframework/cglib/core/internal/LoadingCache.createEntry(LoadingCache.java:61)
at org/springframework/cglib/core/internal/LoadingCache.get(LoadingCache.java:34)
at org/springframework/cglib/core/AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:116)
at org/springframework/cglib/core/AbstractClassGenerator.create(AbstractClassGenerator.java:291)
at org/springframework/cglib/proxy/Enhancer.createHelper(Enhancer.java:480)
at org/springframework/cglib/proxy/Enhancer.createClass(Enhancer.java:337)
at org/springframework/context/annotation/ConfigurationClassEnhancer.createClass(ConfigurationClassEnhancer.java:135)
at org/springframework/context/annotation/ConfigurationClassEnhancer.enhance(ConfigurationClassEnhancer.java:107)
at org/springframework/context/annotation/ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:406)
at org/springframework/context/annotation/ConfigurationClassPostProcessor.postProcessBeanFactory(ConfigurationClassPostProcessor.java:263)
at org/springframework/context/support/PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:284)
at org/springframework/context/support/PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:130)
at org/springframework/context/support/AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:681)
at org/springframework/context/support/AbstractApplicationContext.refresh(AbstractApplicationContext.java:523)
at org/springframework/boot/SpringApplication.refresh(SpringApplication.java:759)
at org/springframework/boot/SpringApplication.refreshContext(SpringApplication.java:369)
at org/springframework/boot/SpringApplication.run(SpringApplication.java:313)
at org/springframework/boot/builder/SpringApplicationBuilder.run(SpringApplicationBuilder.java:134)
at org/springframework/cloud/bootstrap/BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:140)
at org/springframework/cloud/bootstrap/BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:84)
at org/springframework/cloud/bootstrap/BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:62)
at org/springframework/context/event/SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:166)
at org/springframework/context/event/SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:138)
at org/springframework/context/event/SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:121)
at org/springframework/boot/context/event/EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:68)
at org/springframework/boot/SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54)
at org/springframework/boot/SpringApplication.prepareEnvironment(SpringApplication.java:335)
at org/springframework/boot/SpringApplication.run(SpringApplication.java:307)
at org/springframework/boot/web/support/SpringBootServletInitializer.run(SpringBootServletInitializer.java:150)
at org/springframework/boot/web/support/SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:130)
at org/springframework/boot/web/support/SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:86)
at org/springframework/web/SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:169)
at com/ibm/ws/webcontainer/webapp/WebApp.initializeServletContainerInitializers(WebApp.java:2523)
at com/ibm/ws/webcontainer/webapp/WebApp.initialize(WebApp.java:1054)
at com/ibm/ws/webcontainer/webapp/WebApp.initialize(WebApp.java:6562)
at com/ibm/ws/webcontainer/osgi/DynamicVirtualHost.startWebApp(DynamicVirtualHost.java:468)
at com/ibm/ws/webcontainer/osgi/DynamicVirtualHost.startWebApplication(DynamicVirtualHost.java:463)
at com/ibm/ws/webcontainer/osgi/WebContainer.startWebApplication(WebContainer.java:1004)
at com/ibm/ws/webcontainer/osgi/WebContainer.startModule(WebContainer.java:825)
at com/ibm/ws/app/manager/module/internal/ModuleHandlerBase.deployModule(ModuleHandlerBase.java:100)
at com/ibm/ws/app/manager/module/internal/DeployedModuleInfoImpl.installModule(DeployedModuleInfoImpl.java:50)
at com/ibm/ws/app/manager/module/internal/DeployedAppInfoBase.deployModules(DeployedAppInfoBase.java:420)
at com/ibm/ws/app/manager/module/internal/DeployedAppInfoBase.deployApp(DeployedAppInfoBase.java:406)
at com/ibm/ws/app/manager/war/internal/WARApplicationHandlerImpl.install(WARApplicationHandlerImpl.java:66)
at com/ibm/ws/app/manager/internal/statemachine/StartAction.execute(StartAction.java:141)
at com/ibm/ws/app/manager/internal/statemachine/ApplicationStateMachineImpl.enterState(ApplicationStateMachineImpl.java:1191)
at com/ibm/ws/app/manager/internal/statemachine/ApplicationStateMachineImpl.run(ApplicationStateMachineImpl.java:804)
at java/util/concurrent/ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1153(Compiled Code))
at java/util/concurrent/ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java/lang/Thread.run(Thread.java:785)
注意: - 代码区分大小写,仅以大写形式检查COUNTRY。如果需要,可以相应地改变它。