Write code in vba to determine the row number

Assignment Help Visual Basic Programming
Reference no: EM13843689

 

1)

A. How do you access the VBA window?

B. Write code in VBA to determine the row number of the last row with data. Are there any precautions/edge cases to be aware of for that code?

C. Please see EXCEL Attached file with two sheets:

1. "Base", which has data from 7/13-7/26

2. "Addition", which has data from 7/20-8/02.

Write a function in VBA to refresh the data in "Base" with that in "Addition". In other words:

1. Remove records in "Base" if they fall within the date range of records in "Addition"

2. Append the records from "Addition" to "Base". Do not include the Grand Total row

when appending

2)

SQL Case Study:

This is one of the worst query written according to a production support personnel. Why do you think that is the case? And how can you improve? Give 2-3 areas that can be improved.

SELECT
t.*
FROM
(
SELECT
sub.*
FROM
(
SELECT
log_inner.*
FROM
(
SELECT
-- log_visit.*, log_action.name
-- log_visit.*, log_link_visit_action.server_time, log_action.name
log_visit.idvisit,
log_visit.idsite,
CONV(HEX(log_visit.idvisitor), 16, 10) AS idvisitor,
visitor_localtime,
visitor_returning,
visitor_count_visits,
visitor_days_since_last,
visitor_days_since_order,
visitor_days_since_first,
visit_first_action_time,
visit_last_action_time,
visit_exit_idaction_url,
visit_exit_idaction_name,
visit_entry_idaction_url,
visit_entry_idaction_name,
visit_total_actions,
visit_total_searches,
visit_total_events,
visit_total_time,
visit_goal_converted,
visit_goal_buyer,
referer_type,
referer_name,
referer_url,
referer_keyword,
config_id,
config_os,
config_os_version,
config_browser_name,
config_browser_version,
config_device_type,
config_device_brand,
config_device_model,
config_resolution,
config_pdf,
config_flash,
config_java,
config_director,
config_quicktime,
config_realplayer,
config_windowsmedia,
config_gears,
config_silverlight,
config_cookie,
inet_ntoa(CONV(HEX(location_ip), 16, 10)) AS location_ip,
location_browser_lang,
location_country,
location_region,
location_city,
location_latitude,
location_longitude,
log_visit.custom_var_k1,
log_visit.custom_var_v1,
log_visit.custom_var_k2,
log_visit.custom_var_v2,
log_visit.custom_var_k3,
log_visit.custom_var_v3,
log_visit.custom_var_k4,
log_visit.custom_var_v4,
log_visit.custom_var_k5,
log_visit.custom_var_v5,
location_provider,
log_link_visit_action.server_time,
log_action. NAME
FROM
piwik_log_visit AS log_visit
LEFT JOIN piwik_log_link_visit_action AS log_link_visit_action ON log_link_visit_action.idvisit = log_visit.idvisit
LEFT JOIN piwik_log_action AS log_action ON log_action.idaction = log_link_visit_action.idaction_url
WHERE
(
log_visit.idsite IN ('8')
AND log_visit.visit_last_action_time>= '2014-10-31 00:00:00'
AND log_visit.visit_last_action_time<= '2014-10-31 23:59:59'
)
AND (
(
log_link_visit_action.idaction_url IN (
SELECT
idaction
FROM
piwik_log_action
WHERE
(
NAME LIKE CONCAT('%', 'success', '%') -- non indexed string comparison against the entire 91million row log_action table
AND type = 1
)
)
)
)
GROUP BY
log_visit.idvisit
) AS log_inner
ORDER BY
idsite,
visit_last_action_time DESC
) AS sub
GROUP BY
sub.idvisit
ORDER BY
sub.visit_last_action_time DESC
) AS t
WHERE
t. NAME = 'burialplanning.com/free-planning-kit-success/'
OR t. NAME = 'burialplanning.com/free-planning-kit-success-no-match/'
OR t. NAME = 'burialplanning.com/free-planning-kit-home-success/'
OR t. NAME = 'burialplanning.com/request-consultation-success/'
OR t. NAME REGEXP '^burialplanning.com/cemeteries/.+/successind/

OR t. NAME REGEXP '^burialplanning.com/cemeteries/.+/cemetery-post-planning-success/

OR t. NAME REGEXP '^burialplanning.com/cemeteries/.+/success-region/

Reference no: EM13843689

Questions Cloud

Consider dell whish is famouse : for its low inventory of parts (from Dell's suppliers) andfinished products (assembled at Dell's manufacturing facilities). If Dellmaintains low inventory of parts, and if Dell wants the suppliers to ship theparts soon after it places an order for th..
Why are paid-in-capital and retained earnings : Why are paid-in-capital and retained earnings
Cumulative effects: : Merle Company has operated for several years and always shows two years of financial statements for users to make better conclusions about trends.  In Year 20, the firm changed one of its accounting methods.  The change was from a GAAP method to a..
Onsider an electric part with two components in series : 2. Consider an electric part with two components in series (component A and componentB). Component A has a reliability of 88%, while component B has a reliability of 94%. Itis known that if the part fails, it will cost the company $1000.a)  What is t..
Write code in vba to determine the row number : Write code in VBA to determine the row number of the last row with data. Are there any precautions/edge cases to be aware of for that code
Contrast differences in accounting processes and procedure : contrast the differences in accounting processes and procedures
Write a prolog program to solve the water jugs problem : Write a Prolog program to solve the water jugs problem: There are two jugs, one holding 3 and the other 5 litres of water. A number of things can be done with the jugs: they can be filled, emptied, and dumped one into the other either until the pou..
Suppose that daily demand for bagels at the local coffee : Suppose that daily demand for bagels at the local coffee shop where you work is found to be Normally distributed with a mean of 250 and a standard deviation of 75 units
Financial analysis measures : Bring together various financial analysis measures and interpret their meaning in order to draw conclusions about various companies. Note that each situation provided is to be considered independently of the others.

Reviews

Write a Review

Visual Basic Programming Questions & Answers

  Develop vb-net application that includes arrays and loops

Develop a VB.NET application that includes arrays, loops, and IF statements to do the following. Your output must also display the number of applicant(s) being interviewed.

  Display in message label when statements are executed

What will display in MessageLabel when the following statements are executed? Assume that CountInteger = 10. MessageString = "Visual Basic is fun" IF CountInteger

  Design the logic for a program allows a user to enter number

Design the logic for a program that allows a user to enter 15 numbers, then displays each number and its difference from the numeric average of the numbers entered.

  Create a visual basic prototype that has screens for windows

Develop calendar screens for Windows and the Web in which you and create a Visual Basic prototype that has screens for Windows and Web.

  Arithmetic calculator applicationwrite an application that

arithmetic calculator applicationwrite an application that allows the user to enter a series of numbers and manipulate

  Performing a calculation on that value

Individual Visual Logic Calculations. Select two to three Each task must include the following Inputing a value. Performing a calculation on that value. outputting the value. produce Visual Logic files to execute each of these steps.

  Using visual studio, create sample class implementations

Using Visual Studio, create sample class implementations. These will be code stubs that provide the basis for the classes you will be using

  Evaluate statements of an expression language

Project involves completing and extending the C++ program that evaluates statements of an expression language contained in the module 3 case study.

  Create a windows application that functions like a banking

Create a Windows application that functions like a banking account register. Separate the business logic from the presentation layer (create a class with all the methods and properties).

  Visual basic programming discussiondecision logic please

visual basic programming discussiondecision logic please respond to the followingthe use of decision logic is one of

  Data storage & "exception error trapping"

Discussion on Data Storage and  "Exception Error Trapping".

  Determine the output displayed when the button is clicked

Determine the output displayed when the button is clicked. Determine the output displayed when the button is clicked

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd