VBA Code for search number

DineshC

New Member
Joined
Mar 15, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi,


I am looking VBA code for below activity, anyone can help me to share the VBA code for below activity.

Conditions:



I have 3 Excel file in 3 different locations in my PC. (1st excel file sheet name is "Dashboard", 2nd excel file sheet name is "Raw data" & 3rd excel file sheet name is "Template")
All different location saved excel file will not keep open during this VBA running, only “Dashboard” sheet will be kept open, VBA code should take care this condition.


Activity to perform through VBA:


I have 3 search option in 1st Excel sheet "Dash board" (location A1, B1 & C1)
But I will search any one (A1 or B1 or C1) based on the available information with us.

It has to search the number in 2nd excel sheet "Raw data" (if A1 value entered it should search A column, if B1 value entered it should search B column, if C1 value enter it should search C Column in "Raw data" sheet).

If data found it should copy all multiple rows data's (from E to G) & paste in "Template" file location E10 to G10. if data not found show display "the search content not available in Raw data". (Note: A1, B1 & C1 values are interlinked, so if I search A1 or B1 corresponding C1 data only should past to “Template file”) Leave first row in “Raw data” since it’s heading.

"Template" file is the standard format we can paste only 20 rows data in E10 : E29 & G10 : G 29, if search result data rows is beyond 20 rows it should start pasting 21st row data in next sheet of Template plate. (Kindly note Template contains top & bottom standard content test, so if row increase to 21 then below E29: G29 should completely shift all contents to next page) with auto cell alignment.

After data copied to “Template” it should convert the “Template page” to PDF file & save the file in different location of PC (File name must be C1 location of dashboard with current date & time).

Once PDF converted open the saved folder location in PC as well as PDF file.

For next search existing “Template” pasted data must be cleared for new data entry.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Forum statistics

Threads
1,224,824
Messages
6,181,186
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top