Avatar of romlig
Flag for United States of America asked on

vba macro to parse column for value in cell and copy text from cell to different sheet

Hello Experts,

I need to parse each row in column A of the sheet "Data" and look for the text "ip route"
if the cell contains the text, I want to further check and see if the gateway IP address (the last IP in the cell) is equal to the IP address from cell B1 of the "Inputs" sheet.
if it does contain the same gateway IP, i want to create a new sheet called "output", copy the entire cell twice to the new sheet and prepend the text "no" to the first copy, and replace the gateway IP address (last IP in the cell) with the address contained in cell b4 of the input sheet in the second copy.  Please see attached spreadsheet for example data and example output  

Microsoft ExcelVBA

Avatar of undefined
Last Comment

8/22/2022 - Mon
Subodh Tiwari (Neeraj)

The description is a bit confusing at least to me.
Please upload the sample workbook and on output sheet, explain the output for at least first four rows and describe that each row belongs to which row on Data sheet and what portion of the IP is being changed and with what? As I don't find similarities or a pattern on the output sheet.
Sorry if I am missing the logic.
Hammadh Abdul Rahman

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

Does exactly what I need, Thanks Hammadh
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes