Link to home
Start Free TrialLog in
Avatar of romlig
romligFlag 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  

Thanks
example.xlsx
Avatar of Subodh Tiwari (Neeraj)
Subodh Tiwari (Neeraj)
Flag of India image

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.
ASKER CERTIFIED SOLUTION
Avatar of Hammadh Abdul Rahman
Hammadh Abdul Rahman
Flag of Maldives image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of romlig

ASKER

Does exactly what I need, Thanks Hammadh