Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-28-2020, 03:31 AM
albyefield albyefield is offline perform multiple operations when condition fulfilled Windows 10 perform multiple operations when condition fulfilled Office 2016
Novice
perform multiple operations when condition fulfilled
 
Join Date: Jul 2012
Location: Exeter
Posts: 27
albyefield is on a distinguished road
Default perform multiple operations when condition fulfilled

Hi
I have a situation where a column is occupied by a 1 to 3 digit integer but may have or not have multiple characters "i" appended .I wish to return 2 more columns 1 with the no from the first column and the other a string showing the appended "i"s
I managed it using VBA as follows

Sub testerlatest()
Dim a As String
Dim b As String
Dim c As String
n = 2
Do While Cells(n, 1) <> ""
b = ""
c = "i"
a = Cells(n, 1)
i = Len(a)
Do While Right(a, 1) = "i"
i = i - 1
b = b & c
a = Left(a, i)
Loop
Cells(n, 3) = a
Cells(n, 2) = b
n = n + 1
Loop
End Sub

But have been trying to solve the problem without resorting to VBA my problem is that I can’t find a way of doing more than one operation when a condition is true, easy enough to test more than on condition but ---

Any ideas please


Albie
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
perform multiple operations when condition fulfilled Order of Operations in Word tg2018_ Mail Merge 2 08-23-2018 09:59 AM
perform multiple operations when condition fulfilled Search text using logical operations? paik1002 Word 1 02-21-2016 11:48 PM
specifying sender account for mail merge operations eNGiNe Mail Merge 3 12-19-2014 04:24 AM
HELP - SUMIF more than 3 conditions + operations in the sum romelsms123 Excel 0 06-23-2014 09:59 AM
perform multiple operations when condition fulfilled Perform Calculations using List boxes Jennifer_Falcon Word VBA 6 07-26-2011 10:49 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:06 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft